]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/tests/test_busyinfo.py
minitest for wx.BusyInfo
[wxWidgets.git] / wxPython / tests / test_busyinfo.py
diff --git a/wxPython/tests/test_busyinfo.py b/wxPython/tests/test_busyinfo.py
new file mode 100644 (file)
index 0000000..88ec18d
--- /dev/null
@@ -0,0 +1,24 @@
+import wx
+import time
+
+print wx.version()
+
+
+def OnButton(evt):
+    bi = wx.BusyInfo("This is a wx.BusyInfo widget...")
+    
+    # This yield is needed on wxGTK in order to see the text.  Is
+    # there a way around this?
+    if "wxGTK" in wx.PlatformInfo:
+        wx.Yield(); wx.Yield()
+        
+    time.sleep(5)
+
+
+app = wx.App()
+frm = wx.Frame(None)
+pnl = wx.Panel(frm)
+btn = wx.Button(pnl, label="Click me", pos=(10,10))
+btn.Bind(wx.EVT_BUTTON, OnButton)
+frm.Show()
+app.MainLoop()