checkboxes for wxtreectrl in wxformbuilder

382 Views Asked by At

In wxTreeListCtrl we have wxTL_CHECKBOX, but it selects only one item and not all children of that item. Can we have checkbox feature for wxTreeListCtrl which will select all children of subtree when that parent node is selected? Or do we have such similar feature for any other tree component? I need to build a tree structure where, if we select any one node then all its children nodes should be selected. How to do this?

1

There are 1 best solutions below

4
On

If you want to select all children of an item when it is checked, you have to do if yourself by calling CheckItemRecursively() method from your wxEVT_TREELIST_ITEM_CHECKED handler.