]> git.saurik.com Git - wxWidgets.git/commitdiff
workaround sizing bug on Mac
authorRobin Dunn <robin@alldunn.com>
Fri, 25 Aug 2006 19:45:24 +0000 (19:45 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 25 Aug 2006 19:45:24 +0000 (19:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/Treebook.py

index 509e3548df61a1974f39d6caf5e853beeaeb0155..fded8080a5112d0d0a3548afa51a10e84b31bc75 100644 (file)
@@ -60,6 +60,14 @@ class TestTB(wx.Treebook):
         self.Bind(wx.EVT_TREEBOOK_PAGE_CHANGED, self.OnPageChanged)
         self.Bind(wx.EVT_TREEBOOK_PAGE_CHANGING, self.OnPageChanging)
 
         self.Bind(wx.EVT_TREEBOOK_PAGE_CHANGED, self.OnPageChanged)
         self.Bind(wx.EVT_TREEBOOK_PAGE_CHANGING, self.OnPageChanging)
 
+        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)
 
     def makeColorPanel(self, color):
         p = wx.Panel(self, -1)