StrataFrame Forum

Checked TreeView question...

http://forum.strataframe.net/Topic5588.aspx

By Robin J Giltner - 1/4/2007

Am I missing something, but when I place the CheckedTreeView on a form, I can't seem to figure out how to get the checkboxes to show up.  In the normal Windows TreeView their is a Checkboxes property to set to view checkboxes with the nodes, but I don't see that property on the Strataframe TreeView at Design time.  In code I can see the Checkboxes property of the Strataframe treeview, but setting it to true seems to do nothing.

So what blatantly obvious setting am I missing here?

Thanks,

Robin Giltner

By StrataFrame Team - 1/5/2007

The problem is that the CheckedTreeView uses the StateImageIndex of the TreeNode objects, not the Checked property.  They all default to -1, and the possible values for the StateImageIndex are 0, 1, and 2 (unchecked, checked, and intermediate, respectively).  So, when you're creating the nodes, just set their StateImageIndex to 0 before you add them to the tree and the checkboxes will show up.
By Robin J Giltner - 1/5/2007

Awesome. Thanks Ben.

Robin Giltner

By StrataFrame Team - 1/5/2007

No problem... sorry it wasn't clearer.