]> git.saurik.com Git - wxWidgets.git/commitdiff
Just reset the size, not the minsize too, when changing the label or
authorRobin Dunn <robin@alldunn.com>
Fri, 12 Jan 2007 18:40:30 +0000 (18:40 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 12 Jan 2007 18:40:30 +0000 (18:40 +0000)
font.  This is how the native static text widgets behave.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/lib/stattext.py

index 3bc9a4c483ff4394f30fca81afcc24603d8e09ea..f69d9b6160c6983d01545ddca17fc826c34ed308 100644 (file)
@@ -56,7 +56,7 @@ class GenStaticText(wx.PyControl):
         style = self.GetWindowStyleFlag()
         self.InvalidateBestSize()
         if not style & wx.ST_NO_AUTORESIZE:
-            self.SetInitialSize(self.GetBestSize())
+            self.SetSize(self.GetBestSize())
         self.Refresh()
 
 
@@ -69,7 +69,7 @@ class GenStaticText(wx.PyControl):
         style = self.GetWindowStyleFlag()
         self.InvalidateBestSize()
         if not style & wx.ST_NO_AUTORESIZE:
-            self.SetInitialSize(self.GetBestSize())
+            self.SetSize(self.GetBestSize())
         self.Refresh()