Move font and encoding related classes to a new module. Added

wxLocale and wxEncodingConverter.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-04-03 18:15:21 +00:00
parent af2b012d65
commit 68bc8549d8
50 changed files with 6060 additions and 3294 deletions

View File

@@ -149,9 +149,13 @@ class wxListCtrlAutoWidthMixin:
def __init__(self):
""" Standard initialiser.
"""
EVT_SIZE(self, self._onResize)
self._needResize = false
self._lastColMinWidth = None
EVT_SIZE(self, self._onResize)
EVT_LIST_COL_END_DRAG(self, self.GetId(), self._onEndColDrag)
EVT_IDLE(self, self._onIdle)
def resizeLastColumn(self, minWidth):
""" Resize the last column appropriately.
@@ -167,7 +171,7 @@ class wxListCtrlAutoWidthMixin:
'minWidth' is the preferred minimum width for the last column.
"""
self.lastColMinWidth = minWidth
self._lastColMinWidth = minWidth
self._doResize()
# =====================
@@ -182,6 +186,27 @@ class wxListCtrlAutoWidthMixin:
self._doResize()
def _onEndColDrag(self, event):
""" Respond to the user resizing one of our columns.
We resize the last column in the list to match. Note that, because
of a quirk in the way columns are resized under MS Windows, we
actually have to do the column resize in idle time.
"""
self._needResize = true
def _onIdle(self, event):
""" Respond to an idle event.
We resize the last column, if we've been asked to do so.
"""
if self._needResize:
self._doResize()
self.Refresh() # Fixes redraw problem under MS Windows.
self._needResize = false
def _doResize(self):
""" Resize the last column as appropriate.