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

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

Description
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.  

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

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