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

TTreeNode.GetNextVisibleSibling

Gets the next visible node at the same level in the node tree.

Declaration

Source position: comctrls.pp line 3119

public function TTreeNode.GetNextVisibleSibling(

  aEnabledOnly: Boolean = False

):TTreeNode;

Arguments

aEnabledOnly

  

True if the sibling node must also be enabled. False if Enabled is not examined.

Function result

Next visible sibling node in the tree hierarchy, or Nil when a sibling node is not found.

Description

GetNextVisibleSibling is a TTreeNode function used to locate the next sibling node that has its Visible and Expanded properties enabled. A sibling node is one which exists at the same Level as the current node in the node hierarchy; in other words, it is one of the child nodes in the Parent for the current node.

AEnabledOnly indicates whether the node in the return value must also have its Enabled property set. The default value (False) indicates that the Enabled property for the node is not examined.

GetNextVisibleSibling calls GetNextSibling to start the search for a visible sibling node with the required node states. The return value is Nil if there are no sibling nodes after the current node, or a sibling node with the required node states was not found.

GetNextVisibleSibling is used in TTreeNode methods like BottomExpanded, GetNextVisible, GetNextExpanded, and GetFirstVisibleChild. It is also called from methods like TTreeNodes.MultiSelect and TCustomTreeview.DoPaintNode when a tree node is selected or drawn on the TreeView control.

Version info

Modified in LCL version 3.0. Refactored to include the AEnabledOnly argument.

See also

TTreeNode.Visible

  

True if the tree node is visible in the associated TreeView control.

TTreeNode.Parent

  

Parent node for the current tree node.

TTreeNode.GetNextSibling

  

Returns the next node in the tree hierarchy at the same level as the current node.

TTreeNode.BottomExpanded

  

Gets the bottom coordinate for the last visible, expanded child node in the subtree.

TTreeNode.GetNextVisible

  

Gets the next visible node child or sibling for the current node.

TTreeNode.GetNextExpanded

  

Returns the next expanded tree node in the node hierarchy.

TTreeNode.GetFirstVisibleChild

  

Gets the tree node that is the first visible child node in the subtree.

TTreeNodes.MultiSelect

  

Adds nodes relative the specified node to the multi-selection list.

TCustomTreeView.DoPaintNode

  

Renders the specified tree node to the canvas for the control.


Version 4.0 Generated 2025-05-03 Home