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

# TCustomButtonPanel

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

Defines the base class for TButtonPanel.

## Declaration

Source position: buttonpanel.pas line 58

`type TCustomButtonPanel = class(TCustomPanel)`
`protected`
`function CreateControlBorderSpacing; override;` |  | Creates the default BorderSpacing object instance for the class.
`function CustomAlignInsertBefore(); override;` |  | Indicates whether the specified controls were custom-aligned using the OnAlignInsertBefore handler.
`procedure CustomAlignPosition(); override;` |  | Returns the aligned position for a custom-aligned child control, using the OnAlignPosition event handler.
`procedure CalculatePreferredSize(); override;` |  | Override this method to return a different preferred height and/or width for auto-sizing.
`procedure Notification(); override;` |  | Called by components that are freed and which received a FreeNotification.
`procedure SetAlign(); override;` |  | Sets the value for the Align property.
`procedure CMAppShowBtnGlyphChanged(); message;` |  | Performs the control message needed when the visibility for a button glyph has changed.
`procedure CMShowingChanged(); message;` |  | Performs the Lazarus control message when a button visibility is changed.
`public`
`constructor Create(); override;` |  | Constructor for the class instance.
`property Align: TAlign;` |  | Indicates the alignment used for the panel relative to the owner for the panel.
`property AutoSize: Boolean;` |  | Indicates if the panel can automatically adjust its size.
`property OKButton: TPanelBitBtn; [r]` |  | OKButton - a button with the caption 'OK' signifying acceptance by the user.
`property HelpButton: TPanelBitBtn; [r]` |  | HelpButton - a button with the 'Help' caption, for requesting help.
`property CloseButton: TPanelBitBtn; [r]` |  | CloseButton - a button with the 'Close' caption for terminating the Form or panel.
`property CancelButton: TPanelBitBtn; [r]` |  | CancelButton - a button with the 'Cancel' caption for cancelling the operation.
`property ButtonOrder: TButtonOrder; [rw]` |  | ButtonOrder - the order in which the series of buttons will appear on the panel.
`property DefaultButton: TPanelButtonEx; [rw]` |  | The default button executed when Enter or Return are pressed.
`property ShowButtons: TPanelButtons; [rw]` |  | Indicates the buttons displayed on the panel.
`property ShowGlyphs: TPanelButtons; [rw]` |  | Indicates the panel buttons displayed with Glyphs (small images).
`property ShowBevel: Boolean; [rw]` |  | Indicates if a bevel is displayed for the button panel.
`property Spacing: TSpacingSize; [rw]` |  | Contains the spacing around buttons and bevels on the panel.
`end;`

## Inheritance

`TCustomButtonPanel` |  | Defines the base class for TButtonPanel.
`TCustomPanel` |  | The base class for a general container which can hold other objects. It has a customizable border and a central text.
`TCustomControl` |  | The base class for windowed controls which paint themselves.
`TWinControl` |  | Implements a windowed control 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

TCustomButtonPanel is a TCustomPanel descendant which defines the base class for TButtonPanel, a panel containing buttons with glyph images. Buttons are provided for OK, Help, Close, and Cancel operations. Other properties are provided to control the display order for the buttons, the default button for the panel, visibility of the available buttons, and the use of glyphs.

Applications should not create instances of TCustomButtonPanel; use the TButtonPanel ancestor which specifies the visibility of properties (including event handlers).

## See also

TButtonPanel |  | Implements a panel with Bitmap Button instances.
TCustomPanel |  | The base class for a general container which can hold other objects. It has a customizable border and a central text.