From: Robin Dunn Date: Fri, 12 Jan 2007 18:40:30 +0000 (+0000) Subject: Just reset the size, not the minsize too, when changing the label or X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cfce9d35adbbbeb1a570bad108ee799074c0c2d4 Just reset the size, not the minsize too, when changing the label or 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 --- diff --git a/wxPython/wx/lib/stattext.py b/wxPython/wx/lib/stattext.py index 3bc9a4c483..f69d9b6160 100644 --- a/wxPython/wx/lib/stattext.py +++ b/wxPython/wx/lib/stattext.py @@ -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()