I have a treeview that I wish it to be hidden on form load but once some clicks on a command button to open it up below the button on a single click(double click to close it).
I'm not sure if I understood what you want...
For what I understood you want to make a treeview visible when you click a cmdbutton and invisible when you double click it?
If so just place on the click event of your cmdbutton:
tvw.Visible=True
and on the double click:
tvwVisible=False
Then if you want to expand all the nodes just do:
For i=1 to tvw.Nodes.Count
tvw.Nodes(i).Expanded=true
Next i
If you want to position your treeview below the button just do:
oops, you're right, didn't even remembered that...
Well you can use a check box to that, or you can still use a cmdbutton let's say with left click to show the treeview and right click to hide it.
You could also simulate a dblclick on a cmdbutton using a timer to count the time between to clicks, but that wouldn't be necessary I think. I myself would go with the check box option.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.