TreeMixin v0.7

Hi all,

This is version 0.7 of the TreeMixin package. It's almost the same as
version 0.6 but fixes one little bug. It's still not perfect, support
for dragging multiple items at the same time is still lacking and I
sometimes get an exception when I change something in the TreeCtrl or
TreeListCtrl tab and then switch to the CustomTreeCtrl tab:

22:17:23: Hidden root () now has 4 children (was 0)
22:17:27: drop item 1 (1,) on item 2 (2,)
22:17:34: drop item 0 (0,) on item 2 (1,)
Traceback (most recent call last):
  File "...\treemixin\Tree MixinDemo.py", line 197, in OnPageChanged
    newTree.SetExpansionState(oldTree.GetExpansionState())
  File "...\treemixin\treemixin.py", line 536, in SetExpansionState
    self.SetExpansionStateOfChildren(listOfExpandedItems, root)
  File "...\treemixin\treemixin.py", line 564, in SetExpansionStateOfChildren
    self.SetExpansionStateOfItem(listOfExpandedItems, child)
  File "...\treemixin\treemixin.py", line 556, in SetExpansionStateOfItem
    if self.GetItemIdentity(item) in listOfExpandedItems:
  File "...\treemixin\treemixin.py", line 515, in GetItemIdentity
    return self.ItemIndices(item)
  File "...\treemixin\treemixin.py", line 154, in ItemIndices
    ownIndex = self.GetItemChildren(parent).index(item)
ValueError: list.index(x): x not in list

I'm not sure yet what exactly is wrong. So I'll keep working on it
some more. Feedback still appreciated.

Cheers, Frank

PS I'll be off line for a week.

run.py (4.21 KB)

treemixin.py (23.9 KB)

TreeMixinDemo.py (9.62 KB)

TreeMixinTest.py (12.3 KB)