X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/edd13c9d8a9a4493d6883e55248c5bc6871835b7..46831f391b0e5cbf41b76cd314bf1dfc1b390a9e:/wxPython/wx/lib/stattext.py?ds=sidebyside diff --git a/wxPython/wx/lib/stattext.py b/wxPython/wx/lib/stattext.py index 54d7c64e93..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() @@ -138,9 +138,10 @@ class GenStaticText(wx.PyControl): dc.Clear() if self.IsEnabled(): - dc.SetTextForeground(self.GetForegroundColour()) - else: - dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_GRAYTEXT)) + dc.SetTextForeground(self.GetForegroundColour()) + else: + dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_GRAYTEXT)) + dc.SetFont(self.GetFont()) label = self.GetLabel() style = self.GetWindowStyleFlag()