Reference TCustomThinButton
Declared in Codebot.Controls.Buttons.pas on line 34
TCustomThinButton is a flat button with an optional image which draws itself using the current theme
TCustomThinButton = class(TSurfaceGraphicControl)
protected
procedure AreaClick(Area: Integer); override;
procedure Click; override;
function GetAreaCount: Integer; override;
function GetAreaRect(Index: Integer): TRectI; override;
class function GetControlClassDefaultSize: TSize; override;
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: Integer; WithThemeSpace: Boolean); override;
procedure TextChanged; override;
function ThemeAware: Boolean; override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
{ An image strip holding the button image }
property Images: TImageStrip read FImages write SetImages;
{ The index of the image in Images or -1 for no image }
property ImageIndex: Integer read FImageIndex write SetImageIndex default -1;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseEnter; override;
procedure MouseLeave; override;
procedure Draw; override;
{ When true the button is drawn pressed }
property Down: Boolean read FDown write SetDown;
{ The kind of button }
property Kind: TButtonKind read FKind write SetKind default bkButton;
{ OnDrawButton allows custom drawing of the button }
property OnDrawButton: TDrawStateEvent read FOnDrawButton write FOnDrawButton;
{ When true the caption is drawn next to the image }
property ShowCaption: Boolean read FShowCaption write SetShowCaption default False;
public
{ Create a new thin button }
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;See also
TDrawStateEvent in Codebot.Graphics.pas
TImageStrip in Codebot.Graphics.pas
TRectI in Codebot.Graphics.Types.pas
TSurfaceGraphicControl in Codebot.Controls.pas