TCustomTreeView.ClearSelection procedure
Clears the selection in the tree view control.
Declaration
procedure ClearSelection(KeepPrimary: Boolean=False); virtualArguments
KeepPrimary | True if the first node in a multi-selection is kept. |
Description
ClearSelection is a method used to clear tree nodes selected in
the tree view control. ClearSelection uses the value in
MultiSelect to determine the actions needed to clear the selected
nodes.
If MultiSelect has been enabled in the Options for the
control, the ClearMultiSelection method is called to clear the selected nodes.
KeepPrimary indicates whether the first tree node in a
multi-selection is retained. When set to
False, all selected nodes are
removed from the Selections property. Otherwise, the tree node in Selected is
retained.
If MultiSelect has not been enabled, the value in the Selected property is set to Nil to clear the single node selection.
No actions are performed in the method when MultiSelect is False and KeepPrimary is True.
ClearSelections is called from methods that handle mouse or keyboard
selection, like KeyDown and MouseDown. It is also
called when a new value is assigned to the MultiSelect property.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
