JVCL Help:TJvCustomDBTreeView.SelectedIndex
JVCL Help: TJvCustomDBTreeView.SelectedIndex Property
Search in JVCL Help
Search in all projectsSummary
Represents an image index offset to use for items in the data-aware tree view when the item is selected.
Pascal
propertySelectedIndex: Integer;
Description
SelectedIndex is an Integer property that represents an image index offset to use for items in the data-aware tree view when the item is selected. The value in selected is added to the field value retrieved from the IconField in the underlying dataset.
The default value for SelectedIndex is 1, as assigned in the constructor for the object instance.
As an example, let's assume the tree view has four images and four selected images.
Position Description Use In IconField -------- ----------------------------- |
---------------- 0 RootNode (Unselected) Yes 1 RootNode (Selected) No 2 ChildLevel0 (Unselected) Yes 3 ChildLevel0 (Selected) No 4 ChildLevel1 (Unselected) Yes 5 ChildLevel1 (Selected) No 6 |
ChildLevel2 (Unselected) Yes 7 ChildLevel2 (Selected) No |
When SelectIndex contains 1, values returned from IconField should contain either 0, 2, 4, or 6.
Another way to store and access the images includes:
Position Description Use In IconField -------- ----------------------------- |
---------------- 0 RootNode (Unselected) Yes 1 ChildLevel0 (Unselected) Yes 2 ChildLevel1 (Unselected) Yes 3 ChildLevel2 (Unselected) Yes 4 RootNode (Selected) No 5 ChildLevel0 (Selected) No 6 |
ChildLevel1 (Selected) No 7 ChildLevel2 (Selected) No |
When SelectIndex contains 4, values returned from IconField should contain either 0, 1, 2, or 3.
Set SelecteIndex to 0 to use the same ImageIndex for both selected and unselected items in the tree view.
About
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page