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

# TCustomTreeView.OnExpanded

Event handler signalled when a node on the tree view control has been expanded.

## Declaration

Source position: comctrls.pp line 3682

`protected property TCustomTreeView.OnExpanded : TTVExpandedEvent read FOnExpanded write FOnExpanded;`

## Description

OnExpanded is a TTVExpandedEvent property with the event handler signalled when a node on the tree view control has been expanded. It is signalled (when assigned) from the Expand method, and occurs after child nodes have been displayed and scroll bars for the control have been updated. Values in the States property have already been updated to indicate that a node has been expanded and that visible items need to be updated.

An application can implement a handler routine to perform actions needed when the tree node or its children become visible on the control.

Arguments for the event handler include:

Sender
  The object instance (TCustomTreeView) for the event.
Node
  The TTreeNode instance with the node expanded on the tree view control.

Use OnExpanding to perform actions needed immediately prior to expanding a node on the tree view control.

Use OnCollapsing and OnCollapsed to perform actions before or after a node is collapsed on the tree view control.

## See also

TCustomTreeView.Expand |  | Expands the specified tree node and updates the scroll bars for the control.
TCustomTreeView.OnExpanding |  | Event handler signalled prior to expanding a node on the tree view control.
TCustomTreeView.OnCollapsing |  | Event handler signalled prior to collapsing a node on the tree view control.
TCustomTreeView.OnCollapsed |  | Event handler signalled when a tree node has been collapsed on the control.
TCustomTreeView.AutoExpand |  | Expands a tree node when it is clicked or activated in code.
TCustomTreeView.CanCollapse |  | Returns True if a given TreeNode can be collapsed.
TCustomTreeView.CanExpand |  | True if the specified tree node can be expanded.
TCustomTreeView.Collapse |  | Performs actions needed when the specified tree node is collapsed.
TCustomTreeView.States |  | Contains the state values in effect for the control.
TTVExpandedEvent |  | TTVExpandedEvent - generic event handling method for a Tree Node that has been expanded.
TTreeNode.Expand |  | Expands the current tree node, and optionally all descendent nodes.
TTreeNode.Expanded |  | True if the node has been expanded, False when collapsed.
TTreeNode.Visible |  | True if the tree node is visible in the associated TreeView control.