How do I get a busy cursor AND disabled window at the same time? As soon as I disable the main window, the normal cursor reappears. This is happening in Windows XP with wxPython 2.6.1.0.
Here is a small example:
import wx
def OnClick(event):
wx.BeginBusyCursor()
wd = wx.WindowDisabler()
# now the window is disabled, but a normal cursor is displayed
try:
# simulate a long operation
for x in range(10):
wx.Sleep(1)
wx.Yield()
finally:
del wd
wx.EndBusyCursor()
app = wx.PySimpleApp()
frame = wx.Frame(None, title='Hello World')
BUTTON_ID = wx.NewId()
wx.Button(frame, id=BUTTON_ID, label='Ten Second Test')
frame.Bind(wx.EVT_BUTTON, OnClick, id=BUTTON_ID)
frame.Show()
app.MainLoop()
Regards,
Nate