[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Buttons' (#lcl)

TCustomBitBtn

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCustomBitBtn - the ancestor class for TBitBtn.

Declaration

Source position: buttons.pp line 129

type TCustomBitBtn = class(TCustomButton) end;

protected

  FButtonGlyph: TButtonGlyph;

  

FButtonGlyph - local variable holding the Glyph for this button

  class procedure WSRegisterClass; override;

  

Registers this component class with the current WidgetSet.

  procedure ActionChange(); override;

  

ActionChange - Change the action associated with this BitButton

  procedure GlyphChanged();

  

What to do if the Glyph has been changed

  procedure InitializeWnd; override;

  

Copies cached control properties to the just created widget.

  function IsCaptionStored;

  procedure Loaded; override;

  procedure TextChanged; override;

  

Handles changes of the Text property.

  class function GetControlClassDefaultSize; override;

  

Returns the default size for this class of controls (when added to a form).

  procedure CMAppShowBtnGlyphChanged(); message;

public

  constructor Create(); override;

  

Calls inherited Create then initialises layout, style and spacing, creates the Button Glyph

  destructor Destroy; override;

  

frees Button Glyph then calls inherited Destroy

  procedure Click; override;

  

Invokes the OnClick and ActionLink.Execute handlers.

  procedure LoadGlyphFromResourceName();

  procedure LoadGlyphFromLazarusResource();

  

LoadGlyphFromLazarusResource - method for loading the glyph from a Lazarus resource file (.lrs)

  procedure LoadGlyphFromStock();

  function CanShowGlyph;

  property Caption: TCaption; [s]

  property DefaultCaption: Boolean; [rw]

  property Glyph: TBitmap; [rws]

  

The BitMap Glyph to be displayed on the button

  property NumGlyphs: Integer; [rw]

  

The number of glyphs for display

  property Kind: TBitBtnKind; [rw]

  

What kind of BitButton? Custom, OK, Cancel, Yes, No etc

  property Layout: TButtonLayout; [rw]

  

Layout of button - Glyph at top, bottom, left or right

  property Margin: Integer; [rw]

  

The margin to be left around glyphs

  property Spacing: Integer; [rw]

  

The spacing around the BitButton

  property GlyphShowMode: TGlyphShowMode; [rw]

  

Indicates the policy for showing or hiding the glyph image of this button

Inheritance

TCustomBitBtn

  

TCustomBitBtn - the ancestor class for TBitBtn.

|

TCustomButton

  

The base class for clickable buttons (TButton and TBitBtn).

|

TButtonControl

  

The base class for various button controls.

|

TWinControl

  

The base class for controls which can contain other (child) controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components associated with widgets.

|

TComponent

?

TObject

Description

TCustomBitBtn is the ancestor for TBitBtn. If you want to define your own bitbutton class, you should use this class to derive it from.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.