Reference TCaptionBox
Declared in Codebot.Controls.Containers.pas on line 191
TCaptionBox is a panel with a caption area along its top.
The caption area is painted using the system caption colors. It uses the active caption colors while a control inside the box has the input focus and the inactive caption colors otherwise. Clicking the caption area gives the input focus to the first control inside the box, if it has one.
When ShowClose is true a close button is shown at the right of the caption area, which hides the box when clicked. The close button is an icon from the Material Design Icons font.
TCaptionBox = class(TCustomControl)
protected
procedure AdjustClientRect(var ARect: TRect); override;
procedure DoEnter; override;
procedure DoExit; override;
procedure FontChanged(Sender: TObject); override;
procedure TextChanged; override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseLeave; override;
procedure Paint; override;
public
{ Create a new caption box }
constructor Create(AOwner: TComponent); override;
{ Hide the box and invoke OnClose }
procedure Close;
{ Active is true while a control inside the box has the input focus }
property Active: Boolean read FActive;
published
{ The height of the caption area }
property CaptionHeight: Integer read FCaptionHeight write SetCaptionHeight default 28;
{ When ShowClose is true a button which hides the box is shown in the
caption area }
property ShowClose: Boolean read FShowClose write SetShowClose default False;
{ OnClose is invoked after the box is hidden by its close button }
property OnClose: TNotifyEvent read FOnClose write FOnClose;
property Align;
property Anchors;
property BorderSpacing;
property Caption;
property ChildSizing;
property Color;
property Constraints;
property Enabled;
property Font;
property ParentColor;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabOrder;
property Visible;
property OnClick;
property OnContextPopup;
property OnEnter;
property OnExit;
property OnResize;
end;