[wxpython-users] listctrl columnsortermixin resetting # of columns
by Paul Hartley other posts by this author
Jul 8 2008 1:30PM messages near this date
Re: [wxpython-users] style options
|
Re: [wxpython-users] listctrl columnsortermixin resetting # of columns
I have a listctrl with a columnsorter mixin - it's working fine. Sometimes
I have to add more columns to this listctrl, which means I also need to be
able to change the number of columns recognized by the columnsorter mixin.
There's a method called SetColumnCount for this mixin, but I can't figure
out how to access it because if I initialize the mixin, it returns None, so
I don't have an instance of it. I have tried re-doing the init with a new
number of columns, but it won't sort properly anymore. Is there some way I
can access SetColumnCount?
initialization code (it returns None):
self.csm = listmix.ColumnSorterMixin.__init__(self, col_num)
what I've tried:
listmix.ColumnSorterMixin.SetColumnCount(new_cols) - says I need to provide
the mixin instance (duh)
self.csm.SetColumnCount(new_cols) - obviously won't work as self.csm is None
paul
Thread:
Paul Hartley
Robin Dunn
Paul Hartley
|