1. The "requirement" looks intrusive, since I'm writing this GUI with
Boa Constructor,
and i'm not interested in breaking it's ability to read/write my code,
and not interested to write too much wxpython on my own (which what
Boa is for).
2. What does "listView1.SortItems()" for?
I couldn't find a pythonic explanation and/or example.
3. Is there a "Boa way" to do it? (i guess i need to ask them too)
···
On Jul 2, 7:24 pm, Robin Dunn <ro...@alldunn.com> wrote:
Shoola wrote:
> I have an app with wx.ListView object on it, containing 4 columns.
> I'd like to have the table sorted when a user clicks the column title.
> def OnListView1ListColClick(self, event):
> col = event.GetColumn()
> self.sort_results(col)
> def sort_results(self, col):
> ... ok, now what?
> i found self.listView1.SortItems(self.sorttable),
> but i can't find documentation on how to use it,
> and how to apply it to a particular column.
Take a look at the wx.lib.mixins.listctrl.ColumnSorterMixin class.
--
Robin Dunn
Software Craftsmanhttp://wxPython.org
1. The "requirement" looks intrusive, since I'm writing this GUI with
Boa Constructor,
and i'm not interested in breaking it's ability to read/write my code,
and not interested to write too much wxpython on my own (which what
Boa is for).
Sorry, I should have written more in my response. I mentioned the ColumnSorterMixin not only as a class you could use if you wanted, but also as an example of how to do it if you decided that it did not fit your needs as-is.