Could your wx project use a boost from Robin?

* Implement some specific changes/enhancements in wxWidgets or wxPython
that you would like to see in future releases.

Hello Robin

I think CustomTreeCtrl could use some enhancements.

I'm building a program that uses a mix between CTC and VirtualTree to show records from a database, and I'm struggling quite a bit to
set PyData for each tree item and/or a Window for each tree item.
So far the best way I found is to overload SetItemType from VirtualTree this way:

    def SetItemType(self, item, newType):
        # CustomTreeCtrl doesn't support changing the item type on the fly,
        # so we create a new item and delete the old one. We currently only
        # keep the item text, would be nicer to also retain other attributes.
        text = self.GetItemText(item)
        
  # custom functions to retrieve window and data
  win = self.getItemWindow(item)
        data = self.getItemData(item)
        
  newItem = self.InsertItem(self.GetItemParent(item), item, text, ct_type=newType, wnd=win, data=data)
        self.Delete(item)
        return newItem

I think it would be nice to have something like OnGetItemWindow or OnGetItemData helper functions

···

--
Cordialmente

Stefano Bartaletti
Responsabile Software

G.Tosi Spa Tintoria

Skype account: stefano.bartaletti
ICQ contact : 1271960

Viale dell'Industria 61
21052 Busto Arsizio (VA)

Tel. +39 0331 34 48 11
Fax +39 0331 35 21 23