From b4f1aaad5db4fc94a19d5aef92c45b33ccbf5f18 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 24 Feb 2004 02:01:04 +0000 Subject: [PATCH] Some more demo tweaks git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/demo/Button.py | 4 ++-- wxPython/demo/ContextHelp.py | 13 +++++++++++-- wxPython/demo/FloatBar.py | 14 +++++++++++--- wxPython/demo/ListBox.py | 2 +- wxPython/demo/Main.py | 2 +- wxPython/demo/ProgressDialog.py | 7 ++++--- 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/wxPython/demo/Button.py b/wxPython/demo/Button.py index 628d0936e7..75e5893785 100644 --- a/wxPython/demo/Button.py +++ b/wxPython/demo/Button.py @@ -38,13 +38,13 @@ class TestPanel(wx.Panel): mask = wx.MaskColour(bmp, wx.BLUE) bmp.SetMask(mask) - b = wx.BitmapButton(self, 30, bmp, (160, 20), + b = wx.BitmapButton(self, 30, bmp, (260, 20), (bmp.GetWidth()+10, bmp.GetHeight()+10)) b.SetToolTipString("This is a bitmap button.") self.Bind(wx.EVT_BUTTON, self.OnClick, b) - b = wx.Button(self, 40, "Flat Button", (20,150), style=wx.NO_BORDER) + b = wx.Button(self, 40, "Flat Button?", (20,150), style=wx.NO_BORDER) b.SetToolTipString("This button has a style flag of wx.NO_BORDER") self.Bind(wx.EVT_BUTTON, self.OnClick, b) diff --git a/wxPython/demo/ContextHelp.py b/wxPython/demo/ContextHelp.py index 3a6727c504..526a884c83 100644 --- a/wxPython/demo/ContextHelp.py +++ b/wxPython/demo/ContextHelp.py @@ -89,8 +89,17 @@ class TestPanel(wx.Panel): #---------------------------------------------------------------------- def runTest(frame, nb, log): - win = TestPanel(nb, log) - return win + if wx.Platform == "__WXMAC__": + dlg = wx.MessageDialog( + frame, 'The ContextHelp sample does not currently work well on this platform.', + 'Sorry', wx.OK | wx.ICON_INFORMATION + ) + dlg.ShowModal() + dlg.Destroy() + + else: + win = TestPanel(nb, log) + return win #---------------------------------------------------------------------- diff --git a/wxPython/demo/FloatBar.py b/wxPython/demo/FloatBar.py index 0130f3be0e..6b75e9dbee 100644 --- a/wxPython/demo/FloatBar.py +++ b/wxPython/demo/FloatBar.py @@ -81,9 +81,17 @@ class TestFloatBar(wx.Frame): #--------------------------------------------------------------------------- def runTest(frame, nb, log): - win = TestFloatBar(frame, log) - frame.otherWin = win - win.Show(True) + if wx.Platform == "__WXMAC__": + dlg = wx.MessageDialog( + frame, 'FloatBar does not work well on this platform.', + 'Sorry', wx.OK | wx.ICON_INFORMATION + ) + dlg.ShowModal() + dlg.Destroy() + else: + win = TestFloatBar(frame, log) + frame.otherWin = win + win.Show(True) #--------------------------------------------------------------------------- diff --git a/wxPython/demo/ListBox.py b/wxPython/demo/ListBox.py index 83840b1238..ede7ce13b1 100644 --- a/wxPython/demo/ListBox.py +++ b/wxPython/demo/ListBox.py @@ -86,7 +86,7 @@ class TestListBox(wx.Panel): wx.StaticText(self, -1, "Select many:", (200, 50), (65, 18)) - self.lb2 = wx.ListBox(self, 70, (280, 50), (80, 120), sampleList, wx.LB_EXTENDED) + self.lb2 = wx.ListBox(self, 70, (300, 50), (80, 120), sampleList, wx.LB_EXTENDED) self.Bind(wx.EVT_LISTBOX, self.EvtMultiListBox, self.lb2) self.lb2.Bind(wx.EVT_RIGHT_UP, self.EvtRightButton) self.lb2.SetSelection(0) diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index 1807886184..76377ae3c1 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -930,7 +930,7 @@ def main(): os.chdir(demoPath) except: pass - app = MyApp(0) #wx.Platform == "__WXMAC__") + app = MyApp(wx.Platform == "__WXMAC__") app.MainLoop() diff --git a/wxPython/demo/ProgressDialog.py b/wxPython/demo/ProgressDialog.py index 9144175976..ce4220191b 100644 --- a/wxPython/demo/ProgressDialog.py +++ b/wxPython/demo/ProgressDialog.py @@ -41,18 +41,19 @@ def runTest(frame, nb, log): overview = """\ + This class represents a dialog that shows a short message and a progress bar. Optionally, it can display an ABORT button - +

This dialog indicates the progress of some event that takes a while to accomplish, usually, such as file copy progress, download progress, and so on. The display is completely under control of the program; you must update the dialog from within the program creating it. - +

When the dialog closes, you must check to see if the user aborted the process or not, and act accordingly -- that is, if the PD_CAN_ABORT style flag is set. If not then you may progress blissfully onward. - + """ if __name__ == '__main__': -- 2.45.2