Hierarchical checked tree control with tri-state checkboxes in wxPython?
As per the title, is this possible?
By tri-state, I mean the parent node is:
- Checked if all children are checked
- Unchecked if all children are unchecked
- Grey/Filled if some children are checked
I have used them previously in C# but cannot find an equivalent control/implementation for wxPython.
Did you look at wx.lib.agw.CustomTreeCtrl?
I'm not sure it does tri-state out of the box, but it's written in Python, so it should be quite easy to extend it.
I was trying to do the same thing with the CustomTreeCtrl and it does support tri-state check boxes.
When you create the root,
self.root= self.tree.AddRoot("root node",ct_type=1)
or a child node,
it returns a GenericTreeItem object which you can change the attribute _is3State to True with,