How can I set the TreeView's selected node to the default clHighlight color when the TreeView is not focused? I tried this code in the CustomDrawItem and AdvancedCustomDrawItem events - no luck:
if (cdsSelected in State) then
Sender.Canvas.Brush.Color := clHighlight;
Also tried the change the .HideSelection property, makes no difference, still using that very light gray color. I'm using D7.
Source of problem found:
For some reason the
clHighlightcolor can not be used, probably there is some condition in theTTreeViewcode which is checking against this color and does something differently.