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)
#----------------------------------------------------------------------
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
#----------------------------------------------------------------------
#---------------------------------------------------------------------------
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)
#---------------------------------------------------------------------------
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)
os.chdir(demoPath)
except:
pass
- app = MyApp(0) #wx.Platform == "__WXMAC__")
+ app = MyApp(wx.Platform == "__WXMAC__")
app.MainLoop()
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__':