Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable auto contract on ActiveX treeview control 1

Status
Not open for further replies.

swaybright

Technical User
Jun 25, 2003
156
US
I have an treeview control on my form and I am working on coding specific actions when nodes are clicked using the .HitTest(x,y) function. The problem I am having is when I single click (right or left) on a node that has children, the treeview control automatically expands the node so the viewer can see the children--a nice feature except that it also contracts any other nodes that are not in that node hierarchy. This expansion/contraction seems to occur before the MouseUp event I am using to trigger my command bar containing my actions the user can select to manipulate the node. Thus, the .HitTest function no longer returns the information from the clicked node since the nodes shift due to the automatic contract of nodes above it.
Does anyone know how to turn off the auto contract feature? Or do you know an effective work around?

Thanks!
 
btw, I am using Access 2013 with Microsoft TreeView Control, version 6.0
 
There is a property called SingleSel. You need to uncheck it design view, or in code set it to false.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top