RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomTreeView.CustomDrawItem Method
Pascal
function CustomDrawItem(Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage; var PaintImages: Boolean): Boolean; virtual;
C++
virtual __fastcall Boolean CustomDrawItem(TTreeNode Node, TCustomDrawState State, TCustomDrawStage Stage, Boolean PaintImages);

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. 

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!