Vcl.ComCtrls.TTBNewButtonEvent

From RAD Studio API Documentation
Jump to: navigation, search

C++

typedef void __fastcall (__closure *TTBNewButtonEvent)(TToolBar* Sender, int Index, TToolButton* &Button);

Properties

Type Visibility Source Unit Parent
typedef public Vcl.ComCtrls.hpp Vcl.ComCtrls Vcl.ComCtrls

Description

TTBNewButtonEvent is the type of a tool button's TToolBar.OnCustomizeNewButton event handlers.

Sender is the toolbar to which the user is adding a button.

Index is the index in the Buttons property where the new button will appear. This should be assigned as the Index property of the new button.

Button returns a TToolButton object that the event handler creates and initializes. It is used to represent the new tool button in the Buttons property. If the event handler does not return a TToolButton object, the add operation fails.

See Also