views:

1357

answers:

2

Hello Everyone

I have a UltraTree control which selects a page to display in a UltraTabControl. I am catching an event and figure out which node in the tree I want to select. This works all fine, just one (visual) thing wont: the activated node is not highlighted in the UltraTree?

This is what I am doing

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

Actually I assumed, that when I call select() that my node will be highlighted as well (I mean the blue selectionbox around it).

Its probably a very simple issue but I tried quite some properties and methods now, but still no success.

Thanks

+1  A: 

Try looking here:

       Infragistics.Win.UltraWinTree.Override ovr;

       // Get the tree's 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;

The other issue you might have is that the UltraTree control is not Enabled.

Brett Veenstra
+1  A: 

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

pageTree.HideSelection = false;
JP Alioto
Exatclty what the problem was. And so easy to solve :)
lostiniceland
That's like the definition of Infragistics! Glad I could help. :)
JP Alioto