TCustomTreeView.OnGetSelectedIndex property
Event handler signalled to get the ordinal position for the image displayed for a selected node on the tree view control.
Declaration
property OnGetSelectedIndex: TTVExpandedEvent read FOnGetSelectedIndex write FOnGetSelectedIndex;Description
OnGetSelectedIndex is a
TTVExpandedEvent property with
the event handler signalled to get the index position for the selected image
on a tree view node. The index is an ordinal position in the Images assigned
for the control.
OnGetSelectedIndex is signalled (when assigned) from the OnGetSelectedIndex method, and occurs when a tree node is painted to the tree view control. It allows a value assigned to the SelectedIndex property in the tree node to be overridden, or set to a default value. OnGetSelectedIndex is not signalled if Images has not been assigned (is Nil).
Arguments to the event handler include:
- Sender
- The object instance (TCustomTreeView) for the event.
- Node
- The TTreeNode instance examined in the handler routine.
The handler routine should select and assign a value to the SelectedIndex property in Node; there is no way to provide the value as a separate argument or return value.
Use OnGetImageIndex to get the image index for the a node which is not selected on the tree view control.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
