Solved

How to disable root lines, but keep plus/minus box for root nodes in a TreeView in VB.NET?

Posted on 2012-04-04
2
496 Views
Last Modified: 2012-04-16
I'm currently implementing a navigation menu using a TreeView control.

I would like to use headers to group the items in the menu and make it possible to collapse these groups of items so that only the header is visible. Also there is a need for an indicator to let the user know the header is collapsed such as the [+] by setting the .ShowPlusMinus property to true. However there should be no lines between the root nodes (the headers).

Logically I thought I could obtain this by setting the below TreeView properties:

.ShowLines = True
.ShowPlusMinus = True
.ShowRootLines = False

Open in new window


But when I do this, the plusminus indicator disappears as it is apparantle part of the root lines (even though it makes no sense that they should be).

Is there a way to implement it so that root lines are deactivated, but the collapsed [+] indicator as well as child lines are activated?
0
Comment
Question by:andreas_rafn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 37807592
0
 

Author Comment

by:andreas_rafn
ID: 37819022
It looks really good, but I'll try to keep it simple considering the next ones that'll have to do the maintenance when I'm done with it - its for internal company use.
0

Featured Post

Independent Software Vendors: 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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Progress

729 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