Vcl.ComCtrls.TTBNewButtonEvent
C++
typedef void __fastcall (__closure *TTBNewButtonEvent)(TToolBar* Sender, int Index, TToolButton* &Button);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
typedef | public | Vcl.ComCtrls.hpp | Vcl.ComCtrls | Vcl.ComCtrls |
説明
TTBNewButtonEvent は、ツール ボタンの TToolBar.OnCustomizeNewButton イベントのハンドラの型です。
Sender
は、ユーザーがボタンを追加しようとしているツールバーです。
Index
は、新しいボタンを Buttons プロパティ内のどの位置に追加するかを指すインデックスです。これは、新しいボタンの Index プロパティとして割り当てる必要があります。
Button
は、このイベント ハンドラで作成し初期化した TToolButton オブジェクトを返します。これは、Buttons プロパティ内の新しいツール ボタンを表わすのに使用されます。イベント ハンドラが TToolButton オブジェクトを返さない場合、追加操作は失敗です。