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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This is an explanation of a simple data model to help parse a JSON feed
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

705 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

13 Experts available now in Live!

Get 1:1 Help Now