Is there anyway to selectively choose which nodes in a treeview have checkboxes? What I'd like to do is have any node that has a child to not have a checkbox and any node that doesn't have a child to have a checkbox.
Tree nodes can optionally display a check box. To display the check boxes, set the CheckBoxes property of the TreeView to true. The Checked property is set to true for tree nodes that are in a checked state.
You could fake this by turning checkboxes off for the TreeView, and then using an ImageList to display a fake checkbox when the node is clicked.
If you're ambitious, you could try inheriting from TreeNode and creating your own TreeNode class. I'm not sure how that would interact with the TreeView's GetNodeAt(), GetNodeCount(), etc. methods.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.