Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

TElXTreeItem Color; background Color, Bold etc.

Hello everyone,

I used to use the TElTree and the associated TElTreeItem. There it was no problem to assign properties to the node text. But these properties are no longer available in TElXtree and TElXtreeItem. How can I now assign these properties to the text?

Regards,
Peter

Comments

  • 2 Comments sorted by Votes Date Added
  • This is shown in ElPack XTree MegaDemo, you can do it like this:

    Item.UseOwnStyle := True;
    Item.Style.UseBackGroundColor := False;
    Item.Style.CellBackGroundColor := clSilver;
    Item.Style.FontStyles := [fsBold, fsItalic];
    Item.Style.TextColor := clGray;

    Item.Cells[i].UseOwnStyle := True;
    Item.Cells[i].Style.ParentColors := False;
    Item.Cells[i].Style.UseBackGroundColor := True;
    Item.Cells[i].Style.CellBackGroundColor := clSilver;
    Item.Cells[i].Style.FontStyles := [fsBold];
    Item.Cells[i].Style.TextColor := clWhite;
    Item.Cells[i].Style.BorderSides := [ebsLeft, ebsRight, ebsTop, ebsBottom];
    Item.Cells[j].Style.BorderStyle := ibsRaised;
    Item.Cells[j].Style.TextFlags := DT_CENTER;
  • Thank you very much.
Sign In or Register to comment.