TCustomTreeView.Selected property
The selected tree node in the control.
Declaration
property Selected: TTreeNode read GetSelection write SetSelection;Description
Selected is a
TTreeNode property which contains the
selected tree node in the control. A tree node is selected when the Left or
Right mouse button is clicked on the code. It can also be selected by
assigning a
TTreeNode instance to the property.
When a tree node is selected or unselected, the Selected property in the
TTreeNode instance is updated. Use the OnChanging event handler to
determine if a specific tree node can become the selected node in the
control. Use the OnChange event handler to perform actions needed
after the tree node is made the Selected node in the control.
Selecting a tree node forces it to become fully visible in the control. This
includes expanding parent nodes to ensure that the node is visible. The
OnExpanding and OnExpanded event handlers are signalled
before and after actions to a given tree node.
Use the Selections property to access the list of selected tree
nodes when multi-selection has been enabled in the Options for the
control. Use the SelectionCount property to get the number of tree
nodes in the Selections property.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
