This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

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

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