]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxWave.py
1. added GetStdIcon support to wxRenderer
[wxWidgets.git] / wxPython / demo / wxWave.py
CommitLineData
493f1553
RD
1
2from wxPython.wx import *
3
4#----------------------------------------------------------------------
5
6class TestPanel(wxPanel):
7 def __init__(self, parent):
8 wxPanel.__init__(self, parent, -1)
9
10 b = wxButton(self, -1, "Play Sound", (25, 25))
11 EVT_BUTTON(self, b.GetId(), self.OnButton)
12
13
14 def OnButton(self, evt):
15 try:
16 import time
17 if int(time.time()) % 2 == 1:
18 wave = wxWave('data/anykey.wav')
19 else:
20 wave = wxWave('data/plan.wav')
21 wave.Play()
22 except NotImplementedError, v:
23 wxMessageBox(str(v), "Exception Message")
24
25
26#----------------------------------------------------------------------
27
28def runTest(frame, nb, log):
29 win = TestPanel(nb)
30 return win
31
32#----------------------------------------------------------------------
33
34
35overview = """\
36"""