TcxTreeList根据level的不同设置将node设置不同的字体颜色等(20120210 15:28:21)转载

1.添加TcxStyleRepository控件,在该控件中添加一个样式,如QdStyle

2.对QdStyle样式设置字体、颜色等

3.对TcxTreeList添加事件:OnGetContentStyle事件

4.在该事件中添加相应的函数:

   如:我将level=0的node的样式设为QdStyle

   if (ANode <> nil) and (ANode.Level =0) then
       AStyle := QdStyle;

原文地址:https://www.cnblogs.com/zhangzhifeng/p/3103114.html