Vcl.ComCtrls.TToolBar.CustomDrawButton

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

function CustomDrawButton(Button: TToolButton; State: TCustomDrawState;  Stage: TCustomDrawStage; var Flags: TTBCustomDrawFlags): Boolean; virtual;

C++

virtual bool __fastcall CustomDrawButton(TToolButton* Button, TCustomDrawState State, TCustomDrawStage Stage, TTBCustomDrawFlags &Flags);

プロパティ

種類 可視性 ソース ユニット
function protected
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TToolBar

説明

OnCustomDrawButton イベントと OnAdvancedCustomDrawButton イベントを生成します。

CustomDrawButton は,描画処理の異なるステージで自動的に呼び出され,OnCustomDrawButton イベントと OnAdvancedCustomDrawButton イベントを生成します。

Button は,描画することが必要なツールボタンを指定します。

State は,ボタンの状態を記述します。これで,イベントハンドラはボタンのイメージでその状態を反映できます。

Stage は,ペイント処理の現在の状態を示します。Stage が cdPrePaint の場合,CustomDrawButton は OnCustomDrawButton イベントを生成し,それに続けて OnAdvancedCustomDrawButton イベントを生成します。それ以外のすべてのステージでは,CustomDrawButton は OnAdvancedCustomDrawButton イベントだけを生成します。

Flags は,Stage が cdPrePaint の場合にのみ使用されます。これは,デフォルトの描画処理でそれ以降にボタンをレンダリングする方法に影響を与えます。CustomDrawButton は,ツールバーがボタンのレンダリングを進行する方法を示す一連のフラグを返します。

関連項目