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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top