treeview OnBoldItemBeforeSwitch event
Return to Introduction  Previous page  Next page
Applies to
acTreeView component.  

  TacTreeViewBoldItemBeforeSwitchEvent = procedure(Sender: TObject;  
    PrevItemIndex, NewItemIndex: Integer;  
    PrevNode, NewNode: TTreeNode; var Continue: Boolean) of object;  
property OnBoldItemBeforeSwitch: TacTreeViewBoldItemBeforeSwitchEvent;  

The OnBoldItemBeforeSwitch event occurs before the "bold" mark switches from one node to another.  
The PrevItemIndex parameter determines the index of previous "bold" node, NewItemIndex determines the another node, which is about to become "bold".  
In case if you don't want to allow the switching the mark to NewNode — set Continue parameter to False inside the event handler.  

iiwarning This event available only in Delphi 5/BCB 5 or higher!  

See also
BoldNode, ItemIndex and ItemIndexIs properties of BoldItem structure;  
OnBoldItemSwitched event.