Vcl.ComCtrls.TCustomTreeView.CustomDrawItem
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);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | protected | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TCustomTreeView |
Description
Generates an OnCustomDrawItem or OnAdvancedCustomDrawItem event.
CustomDrawItem is called automatically at discrete stages during the painting of tree nodes. It determines what event handlers, if any, are appropriate for the current drawing stage, and generates the appropriate events.
Node is the item that is about to be painted.
State is the item's current state: one or more of cdsSelected, cdsGrayed, cdsDisabled, cdsChecked, cdsFocused, cdsDefault, cdsHot, cdsMarked, cdsIndeterminate. (of type TCustomDrawState)
Stage is the current stage of the painting process.
PaintImages returns a value that indicates whether the tree view should paint the images associated with the current node. This value is only meaningful when Stage is csPrePaint.
CustomDrawItem returns true if the tree view should continue with the default rendering of the item, false if the method completely handled painting the item and there is nothing left to paint.