I searched the forums with no luck, so here is my question.
Is there a way to turn off the highlighting when a tree node is clicked on (selected)?
My tree is color coded by node level and clicking on a parent node to expand it changes the color of that node to the default highlight color, which I don't want. This is a read-only type tree, for information only, so I don't need to select a row and highlight it to show that it is the selected row.
I tried setting FullRowSelect to false, but it still highlights the row. In case it helps, the view style is Outlook Express with multiple columns.
How you turn this off depends on why it's happening in the first place.
It is not the default behavior of the tree to highlight a node when you click on the expansion indicator for that node.
Clicking the expansion indicator does make the node the ActiveNode. So your tree probably has an ActiveAppearance applied to the nodes either in the code or via Application Styling. the easiest way to find out which one is to turn off AppStyling and see if the problem goes away. Just comment out your code that calls StyleManager.Load.
If this is happening because you are setting the Appearance in code, then don't set it (or reset it).
If this is happening because of AppStyling, then the best way to get around it is to remove that styling from the isl file you are using.
Thanks for the reply, Mike. Please excuse my ignorance, but I'm not sure I understand completely what you mean by ActiveAppearance. ActiveAppearance doesn't exist anywhere in the code. I am using a commonColumnSet that has some Appearance settings such as:
commonColumnSet.ColumnHeaderAppearance.BackColor =
Color.Gold;
and
commonColumnSet.Columns[1].CellAppearance.TextHAlign =
HAlign.Right;
Is that what you are talking about? If those lines are causing the effect you mentioned, then I would have to use the workaround I described above because I need those appearances to make it look right.
As for an isl file, I don't think I am using that as I can't find one anywhere in the solution. At this time, I don't even know what an isl file is, but I will research it.