]> git.saurik.com Git - wxWidgets.git/blob - wxPython/tests/test_busyinfo.py
fixed deadlock when calling wxPostEvent() from worker thread
[wxWidgets.git] / wxPython / tests / test_busyinfo.py
1 import wx
2 import time
3
4 print wx.version()
5
6
7 def OnButton(evt):
8 bi = wx.BusyInfo("This is a wx.BusyInfo widget...")
9
10 # This yield is needed on wxGTK in order to see the text. Is
11 # there a way around this?
12 if "wxGTK" in wx.PlatformInfo:
13 wx.Yield(); wx.Yield()
14
15 time.sleep(5)
16
17
18 app = wx.App()
19 frm = wx.Frame(None)
20 pnl = wx.Panel(frm)
21 btn = wx.Button(pnl, label="Click me", pos=(10,10))
22 btn.Bind(wx.EVT_BUTTON, OnButton)
23 frm.Show()
24 app.MainLoop()