X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42a04f70db5f3e16ee6e679ddf8fadbc275ee51b..f50de1504e002ba3afac3491c8b4817870c850d8:/wxPython/wx/lib/mixins/listctrl.py?ds=sidebyside diff --git a/wxPython/wx/lib/mixins/listctrl.py b/wxPython/wx/lib/mixins/listctrl.py index 0a8bb8c6f0..2de4d3bbca 100644 --- a/wxPython/wx/lib/mixins/listctrl.py +++ b/wxPython/wx/lib/mixins/listctrl.py @@ -62,7 +62,7 @@ class ColumnSorterMixin: list = self.GetListCtrl() if not list: raise ValueError, "No wx.ListCtrl available" - self.Bind(wx.EVT_LIST_COL_CLICK, self.__OnColClick, list) + list.Bind(wx.EVT_LIST_COL_CLICK, self.__OnColClick, list) def SetColumnCount(self, newNumColumns): @@ -209,7 +209,7 @@ class ListCtrlAutoWidthMixin: 'minWidth' is the preferred minimum width for the last column. """ - self.resizeColumn(self, minWidth) + self.resizeColumn(minWidth) def resizeColumn(self, minWidth): @@ -226,7 +226,10 @@ class ListCtrlAutoWidthMixin: We automatically resize the last column in the list. """ - wx.CallAfter(self._doResize) + if 'gtk2' in wx.PlatformInfo: + self._doResize() + else: + wx.CallAfter(self._doResize) event.Skip()