Can you disable the Treeview double-click expanding of nodes?

Posted on 2008-11-13
Medium Priority
Last Modified: 2013-12-26
Using Windows.Forms Treeview, I am trying to do some custom action with a treeview when a node is double-clicked.  The problem is that even when I don't have my own doubleclick event handler, the Treeview uses the double-click to automatically expand or contract an expandable node.  Is there a way to turn off this behavior?  It would be ideal if the nodes would only expand/contract if the +/- box on the node were clicked, and the double-click could be for the custom action. There is no SelectAction available since this is Windows.Forms and not a Web.UI.WebControl
MyNode = New TreeNode
                MyNode.Name = "S" & CStr(dr.Item(0))
                MyNode.Text = dr.Item(2)
                MyNode.Tag = "SECTION-" & dr.Item(2)
                MyNode = Nothing

Open in new window

Question by:srbentley
  • 2
  • 2
LVL 13

Expert Comment

ID: 22949758

Author Comment

ID: 22950970
There is no Expanded property in a VB.NET Windows Control Treeview Node.
LVL 13

Accepted Solution

SameerJagdale earned 2000 total points
ID: 22982856

Author Closing Comment

ID: 31516339
Thanks.. That's exactly I needed and couldn't find.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month15 days, 21 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question