From cfce9d35adbbbeb1a570bad108ee799074c0c2d4 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 12 Jan 2007 18:40:30 +0000 Subject: [PATCH] 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 --- wxPython/wx/lib/stattext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() -- 2.45.2