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
482 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
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now