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

# TCustomTreeView.CanExpand

True if the specified tree node can be expanded.

## Declaration

Source position: comctrls.pp line 3567

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

## Arguments

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

## Function result

True if the specified node can be expanded.

## Description

CanExpand is a Boolean function used to determine if the tree node specified in Node can be expanded. CanExpand signals the OnExpanding event handler (when assigned) to get the return value for the method.

The return value can be set to True when Node is visible and contains child nodes. The return value is always True if the OnExpanding event handler has not been assigned.