Double click on treeview control

R

Rob

Hi all,
I am using a treeview control on a form (tvw).
I found out how to do something when a user clicks on a node:
Private Sub tvw_NodeClick(ByVal Node As Object) etc.

But does anyone know if it is possible to double click on a node and do
something with that node (something else than with a simple click)?

I can't find a tvw_NodeDblClick(ByVal Node As Object)....

Thanks for any help,
RLi
 
S

Stefan Hoffmann

hi Rob,
But does anyone know if it is possible to double click on a node and do
something with that node (something else than with a simple click)?
I can't find a tvw_NodeDblClick(ByVal Node As Object)....
Use the NodeClick event to store your selected node. Use the DblClick()
event to process it.


mfG
--> stefan <--
 
A

Alex Dybenko

Hi,
by default double-click opens child nodes, but you can also detect
double-click in click event if on first click you save the time of event in
a static variable and then on next click you compare it with current time,
if less then .5 sec - then double click occurred

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
 
R

Rob

Thank you very much, this was very helpfull,
Your solution works like a charm,
Alex' solution should work also but seems to me a little bit more complex

Thanks both
 

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

Top