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

TCustomTreeView.MoveRight

Changes the selected tree node on the control.

Declaration

Source position: comctrls.pp line 3729

public procedure TCustomTreeView.MoveRight(

  ASelect: Boolean = False

);

Arguments

ASelect

  

True if the new tree node is selected, False if it has the focus rectangle.

Description

MoveRight is a method used to change the selected tree node on the control by moving towards the right (or downwards) in the node hierarchy. The action normally results in the next expanded sibling or child node becoming the selected tree node.

The behavior in MoveRight is influenced by the settings in the Options property and the value in the ASelect argument.

ASelect indicates whether the new node becomes a Selected node on the tree view control (when True) or simply has the focus rectangle (when False).

If multi-selections are enabled in Options (using tvoAllowMultiSelect), the movement starts from the last node in the multi-selection range. Otherwise the Selected node is used to start the movement.

Prior to changing the active node, the node must be in the Expanded state. When not enabled, Expanded is set to True but the Selected node does not change. If Expanded is already enabled, the GetNextExpanded method is called to get the target node for the movement. The MoveSelection method is called to change to the specified node and set its Selected (or MultiSelected) attributes to the value in ASelect.

MoveRight is used in the KeyDown method for the control.

Version info

Added in LCL version 3.0.

See also

TCustomTreeView.MoveSelection

  

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

TCustomTreeView.Options

  

The set of options enabled in the tree view control.

TCustomTreeView.Selected

  

The selected tree node in the control.

TCustomTreeView.Selections

  

Provides indexed access to the multi-selected tree nodes in the control.

TCustomTreeView.SelectionCount

  

Number of selected nodes in the tree view.

TCustomTreeView.KeyDown

  

Handles key down events for the control.

TTreeNode.Expanded

  

True if the node has been expanded, False when collapsed.

TTreeNode.GetNextExpanded

  

Returns the next expanded tree node in the node hierarchy.

TTreeNode.Selected

  

True if the current node is selected in the tree view control.

TTreeNode.MultiSelected

  

Indicates whether the node is one of several nodes selected simultaneously (e.g. using the Shift or Ctrl key while selecting on a tree view control).

TTreeViewOption

  

TTreeViewOption - enumerated type containing the permissible values for Options in TreeViews.

TTreeViewOptions

  

Set type used to store values from the TTreeViewOption enumeration.


Version 3.2 Generated 2024-02-25 Home