treeview ItemIndex property
Return to Introduction  Previous page  Next page
Applies to
acTreeView component as subproperty of BoldItem structure.  

property ItemIndex: Integer; // -1 by default  

The ItemIndex specifies the index of node which should be marked out with bold text, colors, and image at the right side (if specified).  
The "bold" node can be specified by either: absolute index of node within TreeView control, or by image index of the node (Node: even in this case, the standard image at the left from node may be not displayed, if ImageList for entire TreeView are not specified). To choose the way of specifying the "bold" node, by absolute index or image index — set it in the ItemIndexIs property.  
The bold node can be switched programmatically by changing the ItemIndex value, or automatically on double click. If you want to allow switching it on double click — set SwitchToBoldOnDblClick to True.  
If you don't want to mark out any node — set ItemIndex to -1 (clear the mark).  

See also
ItemIndexIs, SwitchSelectionOnBold, SwitchToBoldOnDblClick and Text properties;  
OnBoldItemBeforeSwitch and OnBoldItemSwitched events.