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

# TTreeNodes.MultiSelect

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

## Declaration

Source position: comctrls.pp line 3294

`public procedure TTreeNodes.MultiSelect(`
`Node: TTreeNode;`
`ClearWholeSelection: Boolean`
`);`

## Arguments

`Node` |  | Tree node with the child or sibling nodes added to the selection list.
`ClearWholeSelection` |  | True to remove all existing nodes in the selection list, False to remove the most recent node.

## Description

MultiSelect is a method used add nodes to the internal selection list relative to the node specified in Node. MultiSelect uses values in the MultiSelectStyle property for the tree view control in Owner to determine the nodes added. Specifically:

msSiblingOnly
  When present, only sibling nodes are selected for the specified node. When omitted, child nodes are added to the multi-selection.
msVisibleOnly
  When present, only visible nodes are included in the multi-selection. When omitted, all nodes are eligible regardless of their visibility.

ClearWholeSelection indicates whether all existing nodes in the multi-selection are cleared before added new node(s) to the selection list. When set to True, the ClearMultiSelection method is called. Otherwise, the last node in the selection list is removed.

Nodes in the internal selection list are visited to set their MultiSelected property to True. Members used to track the first and last nodes in the multi-selection are updated prior to exit.

## See also

TTreeNodes.ClearMultiSelection |  | Clears the nodes in a multi-selection and optionally the selected node on the tree view control.
TTreeNodes.Owner |  | The TCustomTreeView control that is the owner of the container.
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).
TCustomTreeView.MultiSelectStyle |  | Multi-selection options enabled for the tree view control.
TMultiSelectStyle |  | Set type used to store value(s) from TMultiSelectStyles.