Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
how to avoid calling double click event of form on expanding treeNode?

Thanks in advance
Posted
Updated 28-Jan-14 5:13am
v2
Comments
[no name] 28-Jan-14 8:38am    
post the code also what have you wrote.Otherwise it is very difficult to tell what is causing the problem.
BillWoodruff 28-Jan-14 12:32pm    
Double-clicking on a TreeNode in the Microsoft TreeView Control will never cause a double-click event to be raised on a Windows Form.

More details, please.

1 solution

on double click event add this code in beginning

if(this.ActiveControl != treeView)
{
    //Do Work
}

or
if(this.ActiveControl == treeView)
{
    return;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900