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

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

Thread ID:





68830 Oct 2,2007 08:16 PM UTC Oct 10,2007 05:10 AM UTC WinForms 1
Tags: Tools
David Elliott
Asked On October 2, 2007 08:16 PM UTC

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 05:10 AM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the 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