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:
parent
f1c5e92f3f
commit
cfce9d35ad
@ -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()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user