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

# TCustomShellTreeView.NodeHasChildren

Determines whether the specified tree view Node has child nodes.

## Declaration

Source position: shellctrls.pas line 117

`protected function TCustomShellTreeView.NodeHasChildren(`
`Node: TTreeNode`
`):Boolean; override;`

## Function result

True when the node is a directory or contains non-folder objects at the given path.

## Description

NodeHasChildren is an overridden Boolean function used to determine whether the specified tree view Node has child nodes. It re-implements the method from the TCustomTreeView ancestor class to examine the local file system for the path the tree node. It does not call the inherited method.

NodeHasChildren signals the OnHasChildren event handler (when assigned) to get the return value for the method. The shell tree view class instance and the value in Node are passed as arguments to the event handler.

When an event handler has not been assigned, the return value is set to True if the specified Node is a Directory on the local file system.

The return value is also True when the path to the node can be accessed as a sub-directory in Node (when ObjectTypes does not include otNonFolders objects). Include otHidden in ObjectTypes to include hidden directories in the comparison.

## See also

TCustomShellTreeView.ObjectTypes |  | Indicates the file system objects displayed using the control.
TCustomTreeView.NodeHasChildren |  | Determines if the specified tree node has child nodes.
TCustomTreeView.OnHasChildren |  | Event handler signalled to determine if a given node in the tree view has child nodes.