Skip to main content
Table of Contents

TTMSFNCDataGridButton Class

A button item displayed in the header or footer toolbar bar.

API unit family: TMSFNCDataGrid Inherits from: TCollectionItem

Syntax

GeneratedPascalC++
TTMSFNCDataGridButton = class(TCollectionItem)
class PASCALIMPLEMENTATION TTMSFNCDataGridButton : public System::Classes::TCollectionItem

Remarks

Items are created through TTMSFNCDataGridButtons.Add on Header.Bar.Buttons or Footer.Bar.Buttons; the collection owns them. The bar is only shown when both the header/footer and its TTMSFNCDataGridHeaderFooterBar.Visible are True.

By default each item is rendered by an internal toolbar button (Button). Assigning Control replaces that button with a custom control. On click, Callback runs first, then OnClick.

Changing Text, Hint, Bitmap, Width, Enabled or Visible rebuilds the bar.

Properties

Name Description
Bitmap Optional icon rendered next to (or instead of) the caption.
Button The internal toolbar button that renders this item.
Callback Anonymous procedure invoked when the button is clicked.
Control Optional custom control hosted in this button slot instead of the default toolbar button.
DataBoolean Application-defined Boolean value associated with this button.
DataInteger Application-use slot for an arbitrary integer value (e.g. a command ID or record key) associated with this button.
DataObject Application-defined object reference associated with this button.
DataPointer Application-use slot for an arbitrary raw pointer associated with this button.
DataString Application-use slot for an arbitrary string value associated with this button.
Enabled When True (default), the button accepts clicks. Set to False to render the button greyed-out and ignore clicks.
Hint Tooltip text shown when the user hovers over the button.
Name Identifier name for this button.
Text Caption displayed on the button.
Visible When True (default), the button is rendered. Set to False to hide it without removing it from the collection.
Width Width in logical pixels reserved for this button on the toolbar bar. Default is 30.

Events

Name Description
OnClick Event fired when the user clicks this button.

Used by