Simple CustomTreeCtrl issue

Hi, ALL,

I am trying to use CustomTreeCtrl (actually, HyperTreeCtrl) with the check box items.

What I need to do is check/uncheck all {grand} - children of the item if the item is checked/unchecked.

Problem is it’s easy operation if the item has 3-state check box, but not that easy for 2-state.

Here is relevant code. I think I am missing some simple function but looking at the docs, I can’t find it by name. :wink:

item = evt.GetItem()
state = wx.CHK_UNDETERMINED
if self.extension.GetItem3StateValue( item ) == wx.CHK_CHECKED:
state = wx.CHK_UNCHECKED

            else:
                    state = wx.CHK_CHECKED
            self.extension.SetItem3StateValue( item, state )

There should be something like GetItemStateValue(), but I don’t see it at http://wxpython.org/Phoenix/docs/html/lib.agw.customtreectrl.CustomTreeCtrl.html.

Thank you.