Question

I use simultaneously several TVirtualStringTree on the same form.

If a tree has a selected node, but the focus is currently on another tree, the selection is highlighted with a pale gray color.

Is there a simple way to have the selection of an unfocused TVirtualStringTree highlighted with the usual selction color (blue on my computer) ?

Thanks

Was it helpful?

Solution

While setting the colours will work, the "correct" method is enabling TreeOptions --> PaintOptions --> toPopupMode

toPopupMode  // Paint tree as would it always have the focus (useful for tree combo boxes etc.)

OTHER TIPS

Okay, I found it : TVirtualStringTree has a "Color" property, with configurable subcolors, such as "UnfocusedSelctionColor" ...

Thanks, StackOverflow, for taking the glue out of my eyes :-)

[Edit] This was a first way I found to change the color of an unfocused selection, which workd, but glob's answer is the best way to do this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top