X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01732ba144da03ea8c64b13aae3823e6ea03709b..50c8b82054d96a9cc846d09ed98eecad07907be0:/wxPython/wx/lib/buttons.py diff --git a/wxPython/wx/lib/buttons.py b/wxPython/wx/lib/buttons.py index f1e2f737a8..f4b9d7b4fb 100644 --- a/wxPython/wx/lib/buttons.py +++ b/wxPython/wx/lib/buttons.py @@ -77,7 +77,7 @@ class GenButton(wx.PyControl): self.SetLabel(label) self.InheritAttributes() - self.SetBestFittingSize(size) + self.SetInitialSize(size) self.InitColours() self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) @@ -92,15 +92,16 @@ class GenButton(wx.PyControl): self.Bind(wx.EVT_PAINT, self.OnPaint) - def SetBestSize(self, size=None): + def SetInitialSize(self, size=None): """ Given the current font and bezel width settings, calculate and set a good size. """ if size is None: size = wx.DefaultSize - wx.PyControl.SetBestFittingSize(self, size) - + wx.PyControl.SetInitialSize(self, size) + SetBestSize = SetInitialSize + def DoGetBestSize(self): """