X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/969d9b6fa963c0f14298e0ec8aa88b6d6292a6f8..d8d7193d767beecab7335e58df1fa0d25ae1e2ea:/wxPython/wx/lib/stattext.py diff --git a/wxPython/wx/lib/stattext.py b/wxPython/wx/lib/stattext.py index 1c1ac8fca4..ac50f76e73 100644 --- a/wxPython/wx/lib/stattext.py +++ b/wxPython/wx/lib/stattext.py @@ -34,7 +34,7 @@ class GenStaticText(wx.PyControl): wx.PyControl.SetLabel(self, label) # don't check wx.ST_NO_AUTORESIZE yet self.defBackClr = self.GetBackgroundColour() self.InheritAttributes() - self.SetBestSize(size) + self.SetBestFittingSize(size) self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground) self.Bind(wx.EVT_PAINT, self.OnPaint) @@ -50,7 +50,7 @@ class GenStaticText(wx.PyControl): if not style & wx.ST_NO_AUTORESIZE: best = self.GetBestSize() self.SetSize(best) - self.SetSizeHints(best) + self.SetMinSize(best) self.Refresh() @@ -64,7 +64,7 @@ class GenStaticText(wx.PyControl): if not style & wx.ST_NO_AUTORESIZE: best = self.GetBestSize() self.SetSize(best) - self.SetSizeHints(best) + self.SetMinSize(best) self.Refresh()