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

# TCustomTreeView.NodeHasChildren

Determines if the specified tree node has child nodes.

## Declaration

Source position: comctrls.pp line 3629

`protected function TCustomTreeView.NodeHasChildren(`
`Node: TTreeNode`
`):Boolean; virtual;`

## Arguments

`Node` |  | Tree node examined in the method.

## Function result

True if the node has child nodes. False if OnHasChildren has not been assigned.

## Description

NodeHasChildren is a Boolean function used to determine if the tree node specified in Node has child nodes. NodeHasChildren signals the OnHasChildren event handler (when assigned) to determine the return value for the method. The return value is False if OnHasChildren has not been assigned.

NodeHasChildren is called when a tree node reads the value for its HasChildren property. The TTreeNode instance uses an existing value in its States flags when available. If not set, NodeHasChildren is used to determine if the flag value (nsHasChildren) is included in or excluded from the States property in the tree node.

## See also

TCustomTreeView.OnHasChildren |  | Event handler signalled to determine if a given node in the tree view has child nodes.
TTreeNode.HasChildren |  | Indicates whether the tree node has child nodes.
TTreeNode.States |  | Contains active state flags for the tree node.
TTreeNode.TreeView |  | The tree view control where the node is displayed.
TNodeStates |  | Set type used to store TNodeState value(s).
TNodeState |  | Enumerated type denoting the state for a TreeNode.