Vcl.ComCtrls.TCustomTreeView.CustomDrawItem

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

Delphi

function CustomDrawItem(Node: TTreeNode; State: TCustomDrawState;
Stage: TCustomDrawStage; var PaintImages: Boolean): Boolean; virtual;

C++

virtual bool __fastcall CustomDrawItem(TTreeNode* Node, TCustomDrawState State, TCustomDrawStage Stage, bool &PaintImages);

プロパティ

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

説明

OnCustomDrawItem イベントまたは OnAdvancedCustomDrawItem イベントを生成します。

CustomDrawItem は,ツリーノードのペイント処理の各段階で自動的に呼び出されます。CustomDrawItem は,現在の描画の段階ではどのイベントハンドラが適しているかを決定し,適切なイベントを生成します。

Node は,ペイントする項目です。

State は,項目の現在の状態です。cdsSelected,cdsGrayed,cdsDisabled,cdsChecked,cdsFocused,cdsDefault,cdsHot,cdsMarked,cdsIndeterminate のうち,1 つまたは複数で示されます。

Stage は,現在のペイント処理の段階です。

PaintImages は,現在のノードに関連付けられたイメージをツリービューがペイントするかどうかを示す値を返します。この値は,Stage が csPrePaint の場合にのみ役立ちます。

CustomDrawItem ツリービューが項目のデフォルトのレンダリングを続けなければならないなら true を返し,メソッドが項目の描画を完全に行ってしまい,これ以上描画する必要がないなら false を返します。

関連項目