HowTo: highlight selected node in UltraTree

I have an UltraTree control that selects a page to display in UltraTabControl. I will catch the event and find out which node in the tree I want to select. This works fine, only one (visual) thing is common: does the activated node not stand out in UltraTree?

This is what I do

pageTree.ActiveNode = pageTree.Nodes[tab.Key]; pageTree.ActiveNode.Selected = true; // raise an selection-event, so the right tab gets displayed pageTree.Select(); 

In fact, I assumed that when I call select (), my highlighted node will also be highlighted (I mean the blue selection bar around it).

This is probably a very simple problem, but now I tried to apply some properties and methods, but still did not succeed.

thanks

+4
source share
2 answers

This should work for you (set before installing Selected) ...

 pageTree.HideSelection = false; 
+10
source

Try to find here:

  Infragistics.Win.UltraWinTree.Override ovr; // Get the tree Override property so we can // set the default for all nodes. ovr = this.ultraTree1.Override; // Turn hot tracking on ovr.HotTracking = DefaultableBoolean.True; // Set the borderstyle to solid but the border color // to trasnparent so the borders don't show by default. ovr.BorderStyleNode = UIElementBorderStyle.Solid; ovr.NodeAppearance.BorderColor = Color.Transparent; // Set default border colors for active, expanded, // hot tracked and selected nodes. ovr.ActiveNodeAppearance.BorderColor = Color.Red; ovr.ExpandedNodeAppearance.BorderColor = Color.Magenta; ovr.HotTrackingNodeAppearance.BorderColor = Color.Blue; ovr.SelectedNodeAppearance.BorderColor = Color.Black; 

Another issue that may arise is that the UltraTree control UltraTree not enabled.

+2
source

All Articles