You can handle MouseDown, use GetNodeFromPoint to get the node at the cursor location (remember to check for null first), and set the node's Selected property to true.
Example:private void ultraTree1_MouseDown(object sender, MouseEventArgs e){ if ( e.Button == MouseButtons.Right ) { UltraTree treeControl = sender as UltraTree; UltraTreeNode nodeAtPoint = treeControl.GetNodeFromPoint( e.Location );
if ( nodeAtPoint != null ) { nodeAtPoint.Selected = true; } }}
If you want folder 'B' to be active, set the control's ActiveNode property to reference that node.
Example:this.ultraTree1.ActiveNode = nodeB;
in my case, when I selected B by right click, both A and B will be highlighted. How can I make only the current selected node be highlighted?
Thanks.
If you want to select only 1 node at a time then use FolderTree.Override.SelectionType property and set it to Single or you want drag and drop functionality also Set it to SingleAutoDrag