We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

disable Right button for TreeViewAdv

simple question, hard answer? TCurrently the right mouse button moves a selection like box to the node you clicked on. When you release, this selection like drawing is cleared and all looks normal again. All I want to do is disable the right mouse button for the treeviewadv OR act just like the left mouse button. Ideas?

1 Reply

AD Administrator Syncfusion Team August 9, 2004 05:14 PM UTC

Hi, According to my understanding you wish to select the TreeNodeAdv in response to a right mouse button click. You could do so by handling the TreeViewAdv'' MouseDown event as shown below : private void treeViewAdv1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if (e.Button == MouseButtons.Right) { Point p = this.treeViewAdv1.PointToClient(Control.MousePosition); TreeNodeAdv node = this.treeViewAdv1.PointToNode(p); this.treeViewAdv1.SelectedNode = node; } } Please refer to the sample attached that illustrates this and let me know if this meets your requirements. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Up arrow icon