]> git.saurik.com Git - wxWidgets.git/commitdiff
Set the client size as calculated, but use the full size for the size hints
authorRobin Dunn <robin@alldunn.com>
Thu, 17 Jun 2004 23:18:57 +0000 (23:18 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 17 Jun 2004 23:18:57 +0000 (23:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/lib/masked/combobox.py
wxPython/wx/lib/masked/maskededit.py

index 3619c398f2211df5b0e93f1bba740d0a526cb4dc..8a78f9b651e6c8d10b8b67b2c7bf50e1691ec27c 100644 (file)
@@ -88,6 +88,7 @@ class BaseMaskedComboBox( wx.ComboBox, MaskedEditMixin ):
 
         if self._autofit:
             self.SetClientSize(self._CalcSize())
+            self.SetSizeHints(self.GetSize())
 
         if value:
             # ensure value is width of the mask of the control:
index a38facc38f19ecef54be5cd6dd536063811d1c7e..ec0d1de1fc4f53bf394626bee5c70577bb4899f6 100644 (file)
@@ -1915,9 +1915,8 @@ class MaskedEditMixin:
 
             if self._autofit:
 ##                dbg('setting client size to:', self._CalcSize())
-                size = self._CalcSize()
-                self.SetSizeHints(size)
-                self.SetClientSize(size)
+                self.SetClientSize(self._CalcSize())
+                self.SetSizeHints(self.GetSize())
 
             # Set value/type-specific formatting
             self._applyFormatting()
@@ -1992,9 +1991,8 @@ class MaskedEditMixin:
                 self._SetInitialValue()
 
                 if self._autofit:
-                    size = self._CalcSize()
-                    self.SetSizeHints(size)
-                    self.SetClientSize(size)
+                    self.SetClientSize(self._CalcSize())
+                    self.SetSizeHints(self.GetSize())
 
             # Set value/type-specific formatting
             self._applyFormatting()