TCustomShellTreeView.NodeHasChildren function
Determines whether the specified tree view Node has child nodes.
Declaration
function NodeHasChildren(Node: TTreeNode): Boolean; overrideFunction 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
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
