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.

Clicking on +/- stops working after implementing MouseUp and MouseDown

Thread ID:





68830 Oct 2,2007 04:16 PM Oct 10,2007 01:10 AM Windows Forms 1
Tags: Tools
David Elliott
Asked On October 2, 2007 04:16 PM

I derived from TreeViewAdv and implemented MouseDown and MouseUp as shown below. After I added these two events I can no longer click on the +/- of a node to expand or collapse. I can only do it through double clicking the text.

Any help is appreciated.


public partial class TreeView : TreeViewAdv
public TreeView()

private void TreeView_MouseDown( object sender, MouseEventArgs e )

if ( e.Button == MouseButtons.Right )
if ( (this.RMouseDownNode != null) &&
(this.RMouseDownNode.TextBounds.Contains( this.LastMousePositionToClient() )) )
this.SelectedNode = this.RMouseDownNode;
this.SelectedNode = null;

private void TreeView_MouseUp( object sender, MouseEventArgs e )
this.EndUpdate( true );

Jisha Joy [Syncfusion]
Replied On October 10, 2007 01:10 AM

Hi David,

Thank you for your interest in Syncfusion Products.

The problem is because of the improper usage of BeginUpdate method. When you call the BeginUpdate method it will suspend the painting of control, so the process for expanding the node will not be performed. If you want to suspend the painting on right click then BeginUpdate method should be called after checking the MouseButton.

Please refer the sample from the below link that illustrate this.
Please refer the sample in the link to illustrate this:

rel='nofollow' href="

Please let me know if you have any questions.



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.