Sign in Join
FPDoc Onlineexperiment

TTreeNode.GetPrevExpanded function

Member of TTreeNodepublicIn unit ComCtrls

Returns the previous expanded tree node in the node hierarchy.

Declaration

pascal
function GetPrevExpanded(aEnabledOnly: Boolean=False): TTreeNode

Arguments

aEnabledOnlyTrue if the previous node must be Enabled. False if the Enabled state is not examined in a candidate node.

Function result

Previous expanded sibling node (or one of its descendants) in the node hierarchy.

Description

GetPrevExpanded is a TTreeNode function used to get the previous expanded node in the tree node hierarchy. The node used in the return value must have both Visible and Expanded in its node states. The AEnabledOnly argument indicates whether the node must also have its Enabled property set to True. If AEnabledOnly is False, the Enabled state is not examined in the method.

GetPrevExpanded calls GetPrevVisibleSibling to find a node with the required states. When found, its GetLastVisibleChild is called to find the last child node (or descendant) with the required states. The return value contains the sibling node or a child node found when found. If a previous sibling node does not exist, the return value is set to the Parent for the current node.

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

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.