wxPython - How to add sorting to a ListCtrl?

Benjamin musiccomposition at gmail.com
Tue Jul 24 20:51:46 CEST 2007


On Jul 24, 11:21 am, Robert Dailey <rcdai... at gmail.com> wrote:
> Hi,
>
> I have 3 columns in my list control, each with a different "type" of
> data (for example, one column has names, the other has dates, etc).
> Can anyone reference a tutorial for solving this issue? I've done my
> share of googling to no avail. I need the user to be able to click any
> of the column headers and sort the rows of data by that column in
> ascending or descending order.
There is a mixin for this at wx.lib.mixins.listctrl.ColumnSorterMixin.
To learn how to use it, take a look at the wxPython demo which comes
with the doc distribution. There's a good example in the ListCtrl
demo.
>
> Thanks for your time.





More information about the Python-list mailing list