1
Answer

How to change color for Treeview.SelectedNode

Richard Hor

Richard Hor

14y
31.2k
1
By default, the SelectedNode in Treeview should have backgound color SystemColors.Highlight and fore color SystemColors.HighlightText.
What i want is the SelectedNode to be hightlighted in different fore color (instead of SystemColors.HighlightText)

I've tried to add this code treeView.SelectedNode.ForeColor = Colors.Blue in event handler for AfterSelect, BeforeSelect. However, it did not work as expected.

Haven't tried before to alter the Paint/DrawNode event.

Has anyone had solution? Thx
Answers (1)