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.
Unfortunately, activation email could not send to your email. Please try again.

Tree to work just like the left mouse button.

Thread ID:

Created:

Updated:

Platform:

Replies:

39409 Jan 6,2006 05:33 AM Jan 6,2006 03:37 PM Windows Forms 2
loading
Tags: Tools
Andrew
Asked On January 6, 2006 05:33 AM

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 09:32 AM

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

RightSelection.zip

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

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

CONFIRMATION

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.

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.

;