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

# TTreeNode.GetLastSibling

Gets the last node at the same level as the current node.

## Declaration

Source position: comctrls.pp line 3112

`public function TTreeNode.GetLastSibling: TTreeNode;`

## Function result

Last TTreeNode instance at the same level as the current node, or Nil if a sibling node is not found.

## Description

If Parent has been assigned, the return value is set to the last child node in the Items for the Parent node. If the node is a top-level node (where Parent is unassigned), the value from GetNextSibling is used. The return value is Nil if a sibling node is not found for the current tree node.