Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


Disable auto contract on ActiveX treeview control

Disable auto contract on ActiveX treeview control

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?


RE: Disable auto contract on ActiveX treeview control

btw, I am using Access 2013 with Microsoft TreeView Control, version 6.0

RE: Disable auto contract on ActiveX treeview control

There is a property called SingleSel. You need to uncheck it design view, or in code set it to false.

RE: Disable auto contract on ActiveX treeview control

So simple...


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close