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
This commit is contained in:
Robin Dunn 2007-01-12 18:40:30 +00:00
parent f1c5e92f3f
commit cfce9d35ad

View 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()