X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8eca4fef106b8327e2e55636de3f68a511a4c392..cbb0770040f70b68b235d4c9a1a0f56512856705:/wxPython/demo/SplitTree.py diff --git a/wxPython/demo/SplitTree.py b/wxPython/demo/SplitTree.py index da4156b47a..0f7b4da9e4 100644 --- a/wxPython/demo/SplitTree.py +++ b/wxPython/demo/SplitTree.py @@ -73,13 +73,13 @@ class TestValueWindow(gizmos.TreeCompanionWindow): dc.SetPen(pen) dc.SetBrush(wx.Brush(self.GetBackgroundColour(), wx.SOLID)) - dc.DrawRectangle((rect.x, rect.y), (rect.width+1, rect.height+1)) + dc.DrawRectangle(rect.x, rect.y, rect.width+1, rect.height+1) dc.SetTextForeground("BLACK") dc.SetBackgroundMode(wx.TRANSPARENT) tw, th = dc.GetTextExtent(text) x = 5 y = rect.y + max(0, (rect.height - th) / 2) - dc.DrawText(text, (x, y)) + dc.DrawText(text, x, y) @@ -105,7 +105,7 @@ class TestPanel(wx.Panel): valueWindow = TestValueWindow(splitter, style=wx.NO_BORDER) - splitter.SplitVertically(tree, valueWindow, 150) + wx.CallAfter(splitter.SplitVertically, tree, valueWindow, 150) scroller.SetTargetWindow(tree) scroller.EnableScrolling(False, False) @@ -122,8 +122,10 @@ class TestPanel(wx.Panel): def runTest(frame, nb, log): if wx.Platform == "__WXMAC__": - wx.MessageBox("This demo currently fails on the Mac. The problem is being looked into...", "Sorry") - return + from Main import MessagePanel + win = MessagePanel(nb, 'This demo currently fails on the Mac. The problem is being looked into...', + 'Sorry', wx.ICON_WARNING) + return win win = TestPanel(nb, log) return win