bbm Posted April 8, 2020 Posted April 8, 2020 Hi, is there any way to change the items color of a treeview to the same color of the treeview itself? I change the color of the treeview at runtim as follows - new definition in a css-file: tvcolor .x-tree-view {color: #F0F0F0; background-color: #F0F0F0;} - set the property of the treeview: My_LayoutConfig(UniTreeView1.LayoutConfig).Cls := 'tvcolor'; It works fine, but I have now idea how to change the color of each item. Best regards Quote
Freeman35 Posted April 8, 2020 Posted April 8, 2020 Hi, short way is use html tag in node.texts Quote
Freeman35 Posted April 8, 2020 Posted April 8, 2020 check in browser when press f12, follow sencha's css and use it. or in node.text <span class='your-css'>Just idea</span> or div Quote
bbm Posted April 8, 2020 Author Posted April 8, 2020 Hi, thank you very much for your support. Now I found the needed part: CustomCSS.Add('.tvcolor .x-grid-row {background-color: #FF0000;}'); CustomCSS.Add('.tvcolor .x-tree-view {background-color: #FF0000;}'); Best regards Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.