'Turning off selected item highlighting in winforms treeview control
I have a winform treeview control with a parent node and some child nodes under it. I'm using colors for the child nodes. So if it's black and the node is selected it will turn red...if it's red it will turn blue and if blue it will turn black. The problem I'm having is when you select a node it stays highlighted. Instead I would like no highlight like it was never selected in the first place. I've tried moving the focus away from the treeview control (doesn't work) and changing the background color of the node (works but is totally ugly). The best workaround I've come up with is I created a parent node at the very top of the tree and I select it after the processing is done. So now the highlighted node is at the top of the treeview (don't like it at all).
How can I do this?
Many thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
