TTMSFMXTreeview Node Text Bold

Hi,


There are numerous OnGetNode..... events in which I can change the DisplayText or color for every node.
Works just fine.
Is there also an event for the Font ?
I want nodes (depending on a particular value) displayed in Bold.

Thx...

Hi, 


the font is a global property applied once to before the drawing of the text of a node. To customize this you'll need to change the font at canvas level:

procedure TForm1.TMSFMXTreeView1BeforeDrawNodeText(Sender: TObject;
  ACanvas: TCanvas; ARect: TRectF; AColumn: Integer;
  ANode: TTMSFMXTreeViewVirtualNode; AText: string; var AAllow: Boolean);
begin
  ACanvas.Font.Style := [TFontStyle.fsBold];
end;

Hi Pieter,


Works perfectly.

Thanks again for the quick support.