Solved

'grey' or undetermining a checkbox in a treeview

Posted on 2006-11-28
2
608 Views
Last Modified: 2012-06-27
G'day experts. I was hoping one of you genius' would know:

I have a treeview with several parent nodes, each containing some child nodes.
I need to be able to select a parent node and have all child nodes follow the checkstate, but if I check a child node, the parent checkbox needs to grey, or become indeterminate UNLESS, all child nodes are selected, in which the parent becomes fully checked OR if all children become unchecked, then the parent becomes unchecked.

I've seen it done in other applications, for example whilst installing Visual Studio it asks what options you want to install and the treeview behaves like this. Anyway, I'm hoping that it's easy enough to do in VB.net as well as whatever compiler those programmes were using.

Thanks for any help. Cheers!
0
Comment
Question by:Phantom_skulcave
2 Comments
 
LVL 3

Accepted Solution

by:
snow_moon earned 250 total points
ID: 18034568
Have a look at
http://www.codeproject.com/cs/miscctrl/TriStateTreeViewSubmissio.asp

It's coded in C#, you might want to convert it to VB though.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

776 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