TDBTree - change font color based upon database field value?
Posted: Thu Oct 06, 2011 5:08 pm
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 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