Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3550
Right mouse click, add to selection
posted

I want to select a node on right mouse click.

I thoght to do it on mouseclick, but I couldnt find Add, on SelectedNodes.

Parents
No Data
Reply
  • 53790
    posted

    Hello Drpoalim,

    I`m not sure, but maybe you are talking about ActiveNode instead of SelectedNodes. SelectedNodes is collection, so you could have more than one selected nodes. I made small sample which activate a node on right mouse click. 

    private void ultraTree1_MouseClick(object sender, MouseEventArgs e)

    {

        if (e.Button == System.Windows.Forms.MouseButtons.Right)

        {

            ultraTree1.ActiveNode = ultraTree1.GetNodeFromPoint(e.X, e.Y);

        }

    }

     

    Please take a look at the attached sample for more details. Please let me know if you think that I misunderstood your scenario

    Regards

    UltraTreeNodeSelection.zip
Children