totem
1
BusyInfo is not displaying any message, only the box is visible (gtk2, wx version 2.8.12.1 on Linux)
Surprisingly adding the wx.Yield() line helps just a little: sometimes there is a message, sometime the box is empty.
import wx
import time
app = wx.App()
busy = wx.BusyInfo(‘Please wait…’)
wx.Yield(True)
time.sleep(10)
del busy
Actually in this very easy example, the message is shown most of the times (but not always), but in the real app a message is seen very rarely…
Thomas
papin1
2
If a widget does not work as expected, you might consider using another one.
Example with the splash screen:
import wx
import wx.lib.agw.advancedsplash as AS
app = wx.App()
w, h = 150, 40
bmp = wx.EmptyBitmapRGBA(w, h, 0, 0, 255, 255)
splash = AS.AdvancedSplash(None, bitmap = bmp,
timeout=2000,
agwStyle=AS.AS_TIMEOUT | AS.AS_CENTER_ON_PARENT,
)
splash.SetText(‘Hello, world!’)
splash.SetTextPosition((w/4, h/4))
splash.SetTextColour(wx.WHITE)
app.MainLoop()
``
In the demo, there are several popup windows, including wxBusyInfo.