Selected color in TTreeView
Posted: Sun Jun 22, 2025 7:32 am
Hello!
This forum has been unused for a long time but i'll give it a try
We use TTreeView in an application and it worked great for years, now since last 6 months we got complaints from customers that the selected nodes are barely distinguishable. We would like to have the background color for selected nodes much more deviant.
We tried OnCustomDrawItem and OnAdvancedCustomDrawItem to draw the text manually and this works, but the icons are not drawn. Then we tried to draw the icons also, but the lines left of the icons and the "plus" signs to expand nodes are not drawn and we don't know how to do this manually.
I there a simple solution how to change the texts background color manually?
Please help, we got stuck here.
This forum has been unused for a long time but i'll give it a try

We use TTreeView in an application and it worked great for years, now since last 6 months we got complaints from customers that the selected nodes are barely distinguishable. We would like to have the background color for selected nodes much more deviant.
We tried OnCustomDrawItem and OnAdvancedCustomDrawItem to draw the text manually and this works, but the icons are not drawn. Then we tried to draw the icons also, but the lines left of the icons and the "plus" signs to expand nodes are not drawn and we don't know how to do this manually.
I there a simple solution how to change the texts background color manually?
Please help, we got stuck here.