[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TCustomTreeView.OnHasChildren

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

Declaration

Source position: comctrls.pp line 3666

protected property TCustomTreeView.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

TCustomTreeView.NodeHasChildren

  

Determines if the specified tree node has child nodes.

TTVHasChildrenEvent

  

Specifies an event handler signalled to determine if a given tree node has child nodes.

TTreeNode.HasChildren

  

Indicates whether the tree node has child nodes.

TTreeNode.States

  

Contains active state flags for the tree node.

TTreeNode.Items

  

Provides indexed access to the child nodes for the current node.


Version 3.2 Generated 2024-02-25 Home