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

TCustomTreeView.MoveSelection

Makes the specified node become selected in the tree view control.

Declaration

Source position: comctrls.pp line 3571

protected procedure TCustomTreeView.MoveSelection(

  ANewNode: TTreeNode;

  ASelect: Boolean

);

Arguments

ANewNode

  

Tree node to select in the control.

ASelect

  

True to include the tree node in Selections (when enabled), False to select only the specified node.

Description

MoveSelection is a method used to make the tree node in ANewNode a selected node in the tree view control. The actions performed depend on the multi-selection setting for the control. When tvoAllowMultiSelect has been included in the Options property, the node is included in Selections when ASelect is True.

If multi-selection has not been enabled for the control, the value in ANewNode is assigned to the Selected property.

The MakeVisible method in the TTreeNode instance is called to make the node visible, and the scroll bars for the control are updated.

Used in the implementation of the KeyDown method. Used to implement methods like MoveHome, MoveEnd, MovePageDown, MovePageUp, MoveToNextNode, and MoveToPrevNode.


Version 3.2 Generated 2024-02-25 Home