]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/Treebook.py
added missing button state
[wxWidgets.git] / wxPython / demo / Treebook.py
index 509e3548df61a1974f39d6caf5e853beeaeb0155..ec3b1d1020dcc51942c7e41609843e08854fca77 100644 (file)
@@ -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)