I don't remember why exactly it was done this way, but it can be used either way. Perhaps there was an assumption that some of the extended behaviors of the listctrl (loading with data, responding to events, etc.) would typically be done in the listctrl's parent, and so it made sense to do the column sorting there too.
···
On 11/18/09 4:34 PM, cappy2112 wrote:
Robin,
class DemoFrame(wx.Frame, wx.lib.mixins.listctrl.ColumnSorterMixin):
def __init__(self):
wx.Frame.__init__(self, None, -1,
"wx.ListCtrl with ColumnSorterMixin",
size=(600,400))
The column sorting feature is an added capability to the ListCtrl, not
the Frame.
Why does the Frame inherit from the mixin class instead of deriving a
custom ListCtrl which inherits from the mixin?