delphi - How to modify the focus-box color in TVirtualStringTree? -
i need modify focus-box's border color of tvirtualstringtree, pic:

you can't control color of dotted focus rectangle. that's determined automatically inverting color of whatever it's drawn on. os provides — , tree control uses — an api that. (you edit source code , replace calls drawfocusrect own function, if want.)
if you're talking color of whole node, first check make sure touseblendedselection paint option set way want it. defaults off, since makes selection rectangle cool when dragging box around items, might have turned on without realizing ordinary selected nodes, too.
if that's not it, adjust 1 of values in tree control's colors property, either focusedselectioncolor or unfocusedselectioncolor. please don't make such change lightly; user has chosen selection color through os options, shouldn't change it. if do use different color, make sure text still readable against whatever new color select.
Comments
Post a Comment