Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HowTo: Highlight the selected node in a UltraTree

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

like image 473
lostiniceland Avatar asked Dec 13 '22 04:12

lostiniceland


1 Answers

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

pageTree.HideSelection = false;
like image 126
JP Alioto Avatar answered Dec 21 '22 23:12

JP Alioto