treeview BoldItem structure
Return to Introduction  Previous page  Next page
Applies to
acTreeView component.  

  { TacTreeViewBoldItem }  
  TacItemIndexIs = (iiAbsoluteIndex, iiImageIndex);  
  TacTreeViewBoldItem = class(TacPersistent)  
    procedure MakeBoldNodeSelected;  
    property BoldNode: TTreeNode;  
    property TextString;  
    property ColorBack: TColor default $00E0E0E0;   // light-gray  
    property ColorFrame: TColor default $00BBBBBB;  // gray  
    property ColorText: TColor default clWindowText;  
    property ImageIndex: Integer default -1;      
    property ImageList: TImageList;  
    property ImageSpacing: Byte default 4;  
    property ItemIndex: Integer default -1;  
    property ItemIndexIs: TacItemIndexIs default iiAbsoluteIndex;  
    property ShowFrame: Boolean default True;  
    property SwitchSelectionOnBold: Boolean default False;  
    property SwitchToBoldOnDblClick: Boolean default False;  
property BoldItem: TacTreeViewBoldItem;  

The BoldItem structure contains the set of properties required to mark out some certain node of TreeView with bold text, color, background, frame around the node, and small picture at the right side (see screenshot below).  
The index of "bold" node are controlled by ItemIndex property, which can be either: absolute node index in the TreeView, OR the standard image index of node. To specify the way how the control should recognize the ItemIndex — set the value of ItemIndexIs property. It can be iiAbsoluteIndex (the ItemIndex is absolute index of node), or iiImageIndex (the ItemIndex is the image index, even if the image are not actually displayed (the source of images are not specified)).  
Also you can specify the colors which additionally marks out the "bold" node — ColorText, ColorFrame and ColorBack[ground].  

iiwarning This property set exists only in Delphi/BCB 5 and higher!  

The item "Ukraine" is a "bold" node  

See also
OnBoldItemBeforeSwitch and OnBoldItemSwitched events.