From RAD Studio API Documentation
Jump to: navigation, search


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


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


Type Visibility Source Unit Parent
function protected
Vcl.ComCtrls TCustomTreeView


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.

See Also