Hello,
Is there a way to prevent the active node in the tree from changing while the user is multiselecting(holding down control of shift key)? I would like the selected nodes to change but the active node should remain the same when the user is multiselecting.
Thanks,
Bill
Hello Bill,
What you could do in your case is to handle AfterSelect event of UltraTree and to add there following code line:
ultraTree1.ActiveNode = ultraTree1.SelectedNodes[0];
now ActiveNode will be the first selected node. Please run the attached sample select a node, then press “Ctr” and select other node from the same node level.
Please let me know if you have any further questions.
Hi Hristo,
Unfortunately this will not work. We listen to the AfterActivate to do some work and this solution will cause the event to be raised more than once on a multiselect. As a workaround I use the AfterSelect event instead and use the first selected node as the active node. I also added a draw filter to remove the focus rectangle from the active node and instead draw it around the first selected node.