double click on "+" of this TreeNode

  • Thread starter Thread starter Boni
  • Start date Start date
B

Boni

Dear all,
I have a question about TreeView elements.
is it possible to differentate double click on TreeNode itself from double
click on "+" of this TreeNode?
Thanks in advance,
Boni
 
Boni,

Out of the box, this isn't possible. The only thing you could do is
override the WndProc method and handle the windows message for the double
click event. When you do that, depending on what version of the framework
you have in stalled you would do two different things.

If you have .NET 2.0 installed, you would call the HitTest method to
determine where the double click took place. The result will tell you where
the double click took place.

If you have a previous version installed, then you will have to obtain
the hit test information by calling the appropriate API through the P/Invoke
layer.

Hope this helps.
 
Back
Top