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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JSON  parse help 7 40
VB.Net - String Manipulation Scenario 2 23
Vb.net threads keep increasing 2 34
SSIS Start 2 20
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…

792 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