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

# TTreeNodes.GetLastExpandedSubNode

Gets the last visible, enabled, expanded tree node in the node hierarchy.

## Declaration

Source position: comctrls.pp line 3271

`public function TTreeNodes.GetLastExpandedSubNode: TTreeNode;`

## Function result

TTreeNode instance found in the method, or Nil.

## See also

TTreeNodes.GetLastVisibleEnabledNode |  | Gets the last top-level sibling node that is visible and enabled.
TTreeNode.GetLastVisibleChild |  | Gets the last child node in the subtree with its Visible property set to True.
TTreeNode.Visible |  | True if the tree node is visible in the associated TreeView control.
TTreeNode.Enabled |  | Controls whether the tree node can be selected, and its visual appearance.
TTreeNode.Expanded |  | True if the node has been expanded, False when collapsed.