Click to See Complete Forum and Search --> : TreeView: How do you get only some nodes to have check boxes.


DeepT
March 26th, 2008, 09:26 AM
I want a treeview where only the outer-most leaves have checkboxes. I can only make everything or nothing have checkboxes.

I think Ill have to inherit from TreeView and make my own class, but I really have no idea what I am supposed to override to get it to dynamically switch on checkboxes as needed. Any suggestions?

jon.borchardt
March 29th, 2008, 04:24 PM
It has been a while since I have done this
But you basically have to give the list an imagelist with three images 'blank' 'unchecked' and 'checked' then tell the items you dont want to have a checkbox to use the image 'blank'

If you do this, you will have to track the checked state of the items on your own... and set the correct image based on the state.