TreeView DoubleClick: Change Behavior

I need to change the behavior when I double-click on a node in tree view.

When a user double-clicks on any node in the tree, that element is added to a list.

Whatever the state of the node is before the double-click I want that to remain the same after the double-click.  So if the node is expanded I want it to stay expanded and if the node is collapsed I want it to stay collapsed.

How do I do this?

Currently my code adds the element to the list but the state of the node changes which is a bit confusing to the user.

Thanks.
LVL 2
dastrwAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ComputronCommented:
You can subclass it

TVEventCancel: Demonstrates how to prevent a Node selection change, expand, and collapse in the Comctl32.ocx TreeView control

http://btmtz.mvps.org/treeview/

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BrianGEFF719Commented:
computron, you've really gone into over drive this month on the answering questions....


Computron has provided a good suggestion: subclass. However, you should understand the problems that can arise from subclassing such as: It makes it extremly difficult to debug your applications. Perhaps you should consider a more robust tree view control. Such as one from VBAccelerator.


Brian
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.