RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TTreeNode.HasChildren Property

Indicates whether a node has any children.

Pascal
property HasChildren: Boolean;
C++
__property Boolean HasChildren;

HasChildren is true if the node has subnodes, or false if the node has no subnodes. If ShowButtons of the tree view is true, and HasChildren is true, a plus (+) button will appear to the left of the node when it is collapsed, and a minus (-) button will appear when the node is expanded.

Note: If a node has no children, setting HasChildren to true will show a (+) plus button, but will not add any child nodes and the node cannot be expanded.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!