Some more demo tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -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)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -89,6 +89,15 @@ class TestPanel(wx.Panel):
 | 
			
		||||
#----------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
def runTest(frame, nb, log):
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -81,6 +81,14 @@ class TestFloatBar(wx.Frame):
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
def runTest(frame, nb, log):
 | 
			
		||||
    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)
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
 
 | 
			
		||||
@@ -930,7 +930,7 @@ def main():
 | 
			
		||||
        os.chdir(demoPath)
 | 
			
		||||
    except:
 | 
			
		||||
        pass
 | 
			
		||||
    app = MyApp(0) #wx.Platform == "__WXMAC__")
 | 
			
		||||
    app = MyApp(wx.Platform == "__WXMAC__")
 | 
			
		||||
    app.MainLoop()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -41,18 +41,19 @@ def runTest(frame, nb, log):
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
overview = """\
 | 
			
		||||
<html><body>
 | 
			
		||||
This class represents a dialog that shows a short message and a progress bar. 
 | 
			
		||||
Optionally, it can display an ABORT button
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
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 <b>completely</b> under control of the program; you must update the dialog from
 | 
			
		||||
within the program creating it. 
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
</body></html>
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user