HyperTreeList problem

Hi, ALL,

OS: WinXP SP3

Python: 2.7

wxPython: 2.9.4

I’m trying to use HyperTreeList with only 1 column where all elements of the tree are checkbox’ed.

What I need to do is when I check an item all children (and grandchildren) of this item will become checked.

So I added a function for the EVT_TREE_ITEM_CHECKING:

def OnItemChecking(self, evt):
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 )

            (child, cookie) = self.extension.GetFirstChild( item )
            while child:

                    self.extension.SetItem3StateValue( child, state )
                    (grandchild, grandcookie) = self.extension.GetFirstChild( child )
                    while( grandchild ):
                            self.extension.SetItem3StateValue( grandchild, state )

                            (grandchild, grandcookie) = self.extension.GetNextChild( child, grandcookie )
                    (child, cookie) = self.extension.GetNextChild( item, cookie )

evt.Skip()

It turns out that when I start the script and all branches are not expanded, the function works as expected.

I can check the branch then expand and everything is checked.

However, if I, before checking, expand the branch, and then try to check, the checkmark appears only on

the item I’m checking. But after collapsing/expanding the item the checkmarks are present as expected.

Is anyone else see this? Should I file a bug?

Thank you.