'grey' or undetermining a checkbox in a treeview
Posted on 2006-11-28
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!