Sign in Join
FPDoc Onlineexperiment

TCustomTreeView.OnHasChildren property

Member of TCustomTreeViewprotectedIn unit ComCtrls

Event handler signalled to determine if a given node in the tree view has child nodes.

Declaration

pascal
property OnHasChildren: TTVHasChildrenEvent read FOnHasChildren write FOnHasChildren;

Description

OnHasChildren is a TTVHasChildrenEvent property with the event handler signalled to determine whether a specified node has child nodes. It is signalled (when assigned) from the NodeHasChildren method, and allows the control to determine whether child nodes for a given node can be displayed on the control. It occurs when a TTreeNode instance gets the value for its HasChildren property and updates the States for the node.

Arguments to the event handler include:

Sender
The TCustomTreeView instance for the event.
ANode
The TTreeNode instance examine for child nodes in the handler routine.

The handler routine returns a Boolean value which indicates whether the specified node has child nodes which can be displayed on the control. The return value can be set to False - even when the tree node actually has child nodes. This allows properties in child nodes, like Data or Level, to be used to determine their effective visibility.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.