Hello,
TDBTree has properties for CodeField and ParentField, which gives a nice hierarchical display. I would like to be able to control the tree item text color that is displayed depending on the value of a database field.
The value of the database field would determine in which color the tree item text would be displayed. I would like the tree item text displayed in blue at the end of the tree (lowest level of the tree).
DBTree1.Color := clred; -- i tried this code but it colors the tree background in red and not individual tree items
I am hoping that the DBTree component is able to do this, and I cannot find it in the help file.
Could you please provide some sample code for me on how to implement this.
If this is not implemented please consider this a feature request.
Thank you in advance,
Erik
TDBTree - change font color based upon database field value?
-
- Newbie
- Posts: 3
- Joined: Mon May 05, 2003 4:00 am
Re: TDBTree - change font color based upon database field value?
Hello Erik,
Excuse us for the delayed reply here.
You can format each shape as in the example at "What's New ?\Welcome !\Nodes\Format\Font" in the TeeTree demo included with the installation. Isn't it what you are trying to achieve? For example:
If you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Excuse us for the delayed reply here.
You can format each shape as in the example at "What's New ?\Welcome !\Nodes\Format\Font" in the TeeTree demo included with the installation. Isn't it what you are trying to achieve? For example:
Code: Select all
Tree1.Shape[0].Font.Color:=clRed;
Tree1.Shape[1].Color:=clGreen;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |