Set the client size as calculated, but use the full size for the size hints

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-06-17 23:18:57 +00:00
parent b52acd035e
commit 3d7d51faea
2 changed files with 5 additions and 6 deletions

View File

@@ -88,6 +88,7 @@ class BaseMaskedComboBox( wx.ComboBox, MaskedEditMixin ):
if self._autofit: if self._autofit:
self.SetClientSize(self._CalcSize()) self.SetClientSize(self._CalcSize())
self.SetSizeHints(self.GetSize())
if value: if value:
# ensure value is width of the mask of the control: # ensure value is width of the mask of the control:

View File

@@ -1915,9 +1915,8 @@ class MaskedEditMixin:
if self._autofit: if self._autofit:
## dbg('setting client size to:', self._CalcSize()) ## dbg('setting client size to:', self._CalcSize())
size = self._CalcSize() self.SetClientSize(self._CalcSize())
self.SetSizeHints(size) self.SetSizeHints(self.GetSize())
self.SetClientSize(size)
# Set value/type-specific formatting # Set value/type-specific formatting
self._applyFormatting() self._applyFormatting()
@@ -1992,9 +1991,8 @@ class MaskedEditMixin:
self._SetInitialValue() self._SetInitialValue()
if self._autofit: if self._autofit:
size = self._CalcSize() self.SetClientSize(self._CalcSize())
self.SetSizeHints(size) self.SetSizeHints(self.GetSize())
self.SetClientSize(size)
# Set value/type-specific formatting # Set value/type-specific formatting
self._applyFormatting() self._applyFormatting()