curiouswebster
asked on
C# WinForms: I can not override OnNodeMouseDoubleClick event for a TreeView
I created a new object which inherits from the TreeView I created in the designer. In the C#, I:
- hide that TreeView
- I construct a new TreeView based on the child class
- assign the value to it from the designer TreeView, to save work for myself
- I show the new TreeView and add it to the Controls list for the form
But, when I double click a collapsed node it expands the node before hitting the breakpoint in my overriden function:
protected override void OnNodeMouseDoubleClick(Tre eNodeMouse ClickEvent Args e)
{
base.OnNodeMouseDoubleClic k(e);
}
I want to stop the collpase expand behavior and get that under my control, so I can only expand/collapse when I choose to.
What am I doing wrong?
- hide that TreeView
- I construct a new TreeView based on the child class
- assign the value to it from the designer TreeView, to save work for myself
- I show the new TreeView and add it to the Controls list for the form
But, when I double click a collapsed node it expands the node before hitting the breakpoint in my overriden function:
protected override void OnNodeMouseDoubleClick(Tre
{
base.OnNodeMouseDoubleClic
}
I want to stop the collpase expand behavior and get that under my control, so I can only expand/collapse when I choose to.
What am I doing wrong?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER