TBaseVirtualTree.HasChildren Property

Virtual Tree View

Read or set whether a node has got children.

Pascal
property HasChildren [Node: PVirtualNode]: Boolean;
Description

A node can be set to have children by assigning true to this property. Internally this will add the vsHasChildren state to the node but not add any child nodes. This state in turn will cause the node to be drawn with a plus sign in front of its caption, denoting so it can be expanded and will show child nodes. As long as the child nodes are not touch in any way (e.g. by expanding the parent node or by navigatin or searching/sorting the tree) there will be no actual child nodes. They simply do not exist yet. However they will be created as soon as an access is done. 

 

Setting the HasChildren property to false will delete any existing child node. 

 

See Also

vsHasChildren, TVirtualNodeStates

Class
Links
What do you think about this topic? Send feedback!