C#, ugly Blue

  • Thread starter Thread starter Mathieu Chavoutier
  • Start date Start date
M

Mathieu Chavoutier

HI.

When I select a Node in my TreeView, It selected in blue. How can I change
it ?
 
HI.

When I select a Node in my TreeView, It selected in blue. How can I change
it ?


The selected color is a system user setting and, as such, should
probably be left as the user has chosen. If you really feel you
*must* override the user's setting, you can subclass the WM_CUSTOMDRAW
message for the control and draw the selection in whatever color you
choose.

HTH,
Bryan
____________________________________________________________
New Vision Software "When the going gets weird,"
Bryan Stafford "the weird turn pro."
alpine_don'(e-mail address removed) Hunter S. Thompson -
Microsoft MVP-Visual Basic Fear and Loathing in LasVegas
 
you can set the public property of TreeNode's BackColor into the needed
value
 
Vladimir Scherbina said:
you can set the public property of TreeNode's BackColor into the needed
value

Nop, the BackColor is the color of Background, not the color of selection.
I have try your solution, and all my tree was Pink :o) (always use uncomon
color to find easily the affected zone)

Thanks anyway.
 
Back
Top