c# - Detect click on the Collapsebutton in a TreeView -


i have treeview nodes. if user doubleclicks node, editdialog node opens can modify data etc. there problem, if user clicks fastly twice onto collapsebutton of node - counts double click. there way avoid this? searched web found nothing helpfull. detecting if click within specific area useless, cause treeview dynamic , scrollable.

many in advance.

you can call hittest , find out user clicked.

private void treeview1_mousedoubleclick(object sender, mouseeventargs e) {     var hittest = treeview1.hittest(e.location);     if (hittest.location == treeviewhittestlocations.plusminus)     {          //expand collapse clicked     } } 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -