X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8fa876ca9ec87e90605808bfcab4d4226965dbad..d5301e336fe89f2962c93ff60d69c25ea81dc355:/wxPython/demo/SplitTree.py diff --git a/wxPython/demo/SplitTree.py b/wxPython/demo/SplitTree.py index 5b2a425053..0a73acdacb 100644 --- a/wxPython/demo/SplitTree.py +++ b/wxPython/demo/SplitTree.py @@ -67,19 +67,19 @@ class TestValueWindow(gizmos.TreeCompanionWindow): text = text + tree.GetItemText(itemId) pen = wx.Pen( - wx.SystemSettings_GetSystemColour(wx.SYS_COLOUR_3DLIGHT), + wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DLIGHT), 1, wx.SOLID ) 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) @@ -97,11 +97,11 @@ class TestPanel(wx.Panel): ) splitter.SetSashSize(2) - tree = TestTree(splitter, -1, style = wx.TR_HAS_BUTTONS | - wx.TR_NO_LINES | - wx.TR_ROW_LINES | - #wx.TR_HIDE_ROOT | - wx.NO_BORDER ) + tree = TestTree(splitter, style = wx.TR_HAS_BUTTONS | + wx.TR_NO_LINES | + wx.TR_ROW_LINES | + #wx.TR_HIDE_ROOT | + wx.NO_BORDER ) valueWindow = TestValueWindow(splitter, style=wx.NO_BORDER) @@ -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 @@ -145,5 +147,5 @@ also be useful by themselves. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])