The selected tree node in the control.
Source position: comctrls.pp line 3716
public property TCustomTreeView.Selected : TTreeNode |
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.
|
OnChanging - specialized event handler while TreeView is being changed. |
|
|
OnChange - specialized event handler for a change in the TreeView. |
|
|
OnExpanding - specialized event handler while a TreeView is being expanded. |
|
|
OnExpanded - specialized event handler when a TreeView has been expanded. |
|
|
Provides indexed access to the multi-selected tree nodes in the control. |
|
|
Number of selected nodes in the tree view. |
|
|
The set of options enabled in the tree view control. |
|
|
True if the current node is selected in the tree view control. |