[wxPython-users] Re: wxTreeCtrl OnCompareItem

Josiah Carlson jcarlson at uci.edu
Tue Aug 8 09:03:00 PDT 2006


Galvin <mygalvin at yahoo.com> wrote:
> 
> Yes you're right, my method will override the compare items method on all
> wx.TreeCtrl instances. That will be a problem if I have more than one
> wx.TreeCtrl and each need to have different way of sorting. But this could be
> avoided when invoking sortChildren and pass in OnCompareItems as an addtional
> argument.
> 
> I've tried your method but the BOA Constructor designer failed to open the file!

Including context will make your replies easier to understand.

As for Boa not knowing how to handle the result I sent you, that is
unfortunate.  Have you tried moving the definition of 'TreeCtrl' into a
different module that is imported by your Frame1.py?  That may or may
not help, but I'm surprised that Boa can't handle such minimal
customization of classes or changing of source.

Alternatively, you could try one of the other GUI designers out there;
XRCed, wxGlade, or even Dabo Designer.  The nice thing about XRCed is
that you are just working with XML and you can refer to custom clases by
name.  If you decide to dig into Dabo, they have made some useful
abstractions over base wxPython, which you may find removes your desire
or need to use a GUI designer in the first place.


 - Josiah





More information about the wxpython-users mailing list