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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Tree to work just like the left mouse button.

Thread ID:





39409 Jan 6,2006 10:33 AM UTC Jan 6,2006 08:37 PM UTC WinForms 2
Tags: Tools
Asked On January 6, 2006 10:33 AM UTC

Hi, In the treeviewadv right button moves a selection to the node I click on. But this selection will look normal the next second.. I want the tree to work just like the left mouse button. Thanks. Regards, Andrew.

Deepa TS [Syncfusion]
Replied On January 6, 2006 02:32 PM UTC

Hi Andrew, According to my understanding,you need to select the node when the mouse is RightClicked as same as when the mouse is LeftClicked. You could do so by handling MouseDown event of treeViewAdv. 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 take a look at the attached sample and let me if this helps you. Thanks for your interest in Syncfusion products. Regards, Deepa.T.S


Administrator [Syncfusion]
Replied On January 6, 2006 08:37 PM UTC

Hi Andrew, You can also use the RMouseDownNode property instead of using the PointToClient/PointToNode logic. Regards, Gregory Austin Syncfusion Inc.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon