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

# TCustomTreeView.AutoExpand

Expands a tree node when it is clicked or activated in code.

## Declaration

Source position: comctrls.pp line 3655

`protected property TCustomTreeView.AutoExpand : Boolean read GetAutoExpand write SetAutoExpand default False;`

## Description

AutoExpand is a Boolean property which indicates if a tree node is automatically expanded when it is Selected using a mouse click or keyboard navigation. The default value for the property is False.

The property value is True when the value tvoAutoExpand has been included in the Options property. Changing the value in the property causes the Options property to be updated. When set to True, the value tvoAutoExpand is included in the Options property. Otherwise, the value is excluded from Options.

AutoExpand is used when the TTreeNodes container in the Items property adds or moves a tree node. If the new tree node or its owner has AutoExpand set to True, the value is also applied to its Parent node.