X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e79c4165b4b80a3725d4fc965caf91bb8d695c84..b4eecebd423df0c6efe86d7658cd3df818d67ed8:/wxPython/demo/Treebook.py diff --git a/wxPython/demo/Treebook.py b/wxPython/demo/Treebook.py index 509e3548df..ec3b1d1020 100644 --- a/wxPython/demo/Treebook.py +++ b/wxPython/demo/Treebook.py @@ -60,6 +60,15 @@ class TestTB(wx.Treebook): self.Bind(wx.EVT_TREEBOOK_PAGE_CHANGED, self.OnPageChanged) self.Bind(wx.EVT_TREEBOOK_PAGE_CHANGING, self.OnPageChanging) + # This is a workaround for a sizing bug on Mac... + wx.FutureCall(100, self.AdjustSize) + + def AdjustSize(self): + #print self.GetTreeCtrl().GetBestSize() + self.GetTreeCtrl().InvalidateBestSize() + self.SendSizeEvent() + #print self.GetTreeCtrl().GetBestSize() + def makeColorPanel(self, color): p = wx.Panel(self, -1)