Hierarchically verified tree control with tri-state flags in wxPython?

According to the title, is this possible?

In tri-state, I mean that the parent node:

  • Checked if all children are checked.
  • Not checked if all children are marked inactive
  • Gray / Filled if some children are marked.

I used them previously in C #, but can't find an equivalent control / implementation for wxPython.

+3
source share
2 answers

Have you looked at wx.lib.agw.CustomTreeCtrl ?

I'm not sure if it makes a tri-state out of the box, but it is written in Python, so it is quite simple to extend it.

+2
source

CustomTreeCtrl, tri-state.

,

self.root= self.tree.AddRoot("root node",ct_type=1)

node,

child= self.tree.AppendItem(parent,"child",ct_type=1)

GenericTreeItem, _is3State True

self.root.Set3State(True)

child.Set3State(True)
+3

Source: https://habr.com/ru/post/1739291/


All Articles