[wx-dev] #9609: wx.ListCtrl with listmix.ColumnSorterMixin causes
bad initial header label alignment on Windows
wxTrac
noreply at wxsite.net
Fri Jun 20 16:40:27 PDT 2008
Ticket URL: <http://trac.wxwidgets.org/ticket/9609>
#9609: wx.ListCtrl with listmix.ColumnSorterMixin causes bad initial header label
alignment on Windows
----------------------+-----------------------------------------------------
Reporter: manpreet | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxMSW | Version: 2.8.7.1
Keywords: | Blockedby:
Patch: 0 | Blocking:
----------------------+-----------------------------------------------------
When wx.ListCtrl is used with listmix.ColumnSorterMixin, the intial
alignment of the list headers is incorrect on Windows. (It is fine on
Solaris and Mac.) After a column has been sorted by user by clicking on
it, the header alignment becomes correct. This can be seen in wxPython's
ListCtrl demo also.
The workaround to this seems to be to duplicate what sorting does to
column headers i.e. reset/change the column image. So the following
example works
{{{
class FooList(wx.ListCtrl, listmix.ColumnSorterMixin ...):
def __init__(...):
...
...
wx.CallAfter(self.workaround)
def workaround(self):
for n in xrange(self.GetColumnCount()):
self.ClearColumnImage(n)
}}}
--
Ticket URL: <http://trac.wxwidgets.org/ticket/9609>
More information about the wx-dev
mailing list