Skip to main content

TcxTreeListNode.HasChildren Property

Specifies whether the node’s expand button is to be displayed if the node has no children.

Declaration

property HasChildren: Boolean read; write;

Property Value

Type
Boolean

Remarks

If the HasChildren property and the tree list’s OptionsView.Buttons property are True, expand buttons will be displayed in the node, even if this node has no children. This can be used in situations when it is necessary to add children on demand. For this purpose, handle the tree list’s OnExpanding event to add child nodes (see the node’s Items property). At runtime, child nodes will be dynamically added to the parent when an end-user clicks the node’s expand button.

Alternatively, you may prefer to use the built-in smart load capability, which requires no coding. If this feature is enabled, the tree list is only populated with child nodes at the time when the parent node is being expanded.

If the node has child nodes and the HasChildren property is set to False, this assignment has no effect.

See Also