[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 155

type TCustomBitBtn = class(TCustomButton)

protected

  FButtonGlyph: TButtonGlyph;

  

An internal member which contains the TButtonGlyph instance for the control.

  class procedure WSRegisterClass; override;

  

Registers this component class with the current WidgetSet.

  procedure ActionChange(); override;

  

ActionChange - Changes the action associated with the control.

  procedure GlyphChanged();

  

Performs actions needed when the value in Glyph has been changed.

  procedure InitializeWnd; override;

  

Copies cached control properties to the just created widget.

  function IsCaptionStored;

  

Gets the storage specifier for the Caption property.

  procedure Loaded; override;

  

Performs actions needed when the component has been loaded using LCL component streaming.

  procedure Notification(); override;

  

Performs actions needed when a sub-component is added or removed in the class instance.

  procedure TextChanged; override;

  

Performs actions needed when the value for the Text property has been changed.

  class function GetControlClassDefaultSize; override;

  

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

  procedure CMAppShowBtnGlyphChanged(); message;

  

Handles the CM_APPSHOWBTNGLYPHCHANGED message for the control.

public

  constructor Create(); override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure Click; override;

  

Performs actions needed when the button is clicked.

  procedure LoadGlyphFromResourceName();

  

Loads the Glyph image with the specified named from a resource instance.

  procedure LoadGlyphFromLazarusResource();

  

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

  procedure LoadGlyphFromStock();

  

Loads a stock glyph image for the specified button identifier.

  function CanShowGlyph();

  

Indicates if the Glyph for the button can be displayed.

  property Caption: TCaption; [s]

  

Contains the descriptive text displayed for the Bitmap button control.

  property DefaultCaption: Boolean; [rw]

  

Indicates if Caption contains the default value for the button Kind.

  property Glyph: TBitmap; [rws]

  

Bitmap with the Glyph displayed on the control.

  property NumGlyphs: Integer; [rw]

  

The number of glyphs available for the control.

  property Images: TCustomImageList; [rw]

  

Contains images available for the control.

  property ImageIndex: TImageIndex; [rw]

  

Ordinal position for the image displayed on the control.

  property ImageWidth: Integer; [rw]

  

Display width for the glyph image on the control.

  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.

end;

Inheritance

TCustomBitBtn

  

TCustomBitBtn - the ancestor class for TBitBtn.

|

TCustomButton

  

The base class for a push button control.

|

TButtonControl

  

Specifies a base class for 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 which have an associated widget.

|

TComponent

?

TObject

Description

TCustomBitBtn is a TCustomButton descendant, and the ancestor for TBitBtn. It provides the interface used to display a button with a glyph (or image) and a caption. It performs an action when the button is clicked.

If you want to define your own bitbutton class, you should derive it from this class.

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