[Overview][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 142

type TCustomBitBtn = class(TCustomButton)

protected

  FButtonGlyph: TButtonGlyph;

  

FButtonGlyph - local variable holding the Glyph for this button

protected

  class procedure WSRegisterClass; override;

  

WSRegisterClass - Register this Class for the current Widget Set

protected

  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;

  

InitializeWnd - initialise the window for this control

  procedure TextChanged; override;

  

Procedure to deal with changes in text

protected

  class function GetControlClassDefaultSize; override;

  

Find the default size for this class of controls (by reference to parents)

protected

  procedure CMAppShowBtnGlyphChanged(); message;

public

  constructor Create(); override;

  

Create - constructor for TCustomBitBtn: calls inherited Create then initialises layout, style and spacing, creates the Button Glyph

  destructor Destroy; override;

  

Destroy - destructor for TCustomBitBtn: frees Button Glyph then calls inherited Destroy

  procedure Click; override;

  

Click - a procedure that allows the programmer to simulate a mouse click over the control, and initiates the same Action as that associated with the OnClick event

  procedure LoadGlyphFromLazarusResource();

  

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

  procedure LoadGlyphFromStock();

  function CanShowGlyph;

  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]

end;

Inheritance

TCustomBitBtn

  

TCustomBitBtn - the ancestor class for TBitBtn.

|

TCustomButton

  

TCustomButton - the base class for TButton and TBitBtn

|

TButtonControl

  

TButtonControl : ancestor class for several Button (including Radio Button) and Check Box classes

|

TWinControl

|

TControl

|

TLCLComponent

  

TLCLComponent - base class for LCL components

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent

|

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.