I am trying to get wxBeginBusyCursor() to work/show when it should!
I do the following:
- start the application
- load a frame and a menu
- call wxBeginBusyCursor() - but it doesn't show!!
- create a toolbar
- load a picture into the notebook
- do self.Show()
- do self.Freeze()
- connect to a db
- load a listctrl
- do self.Thaw() - listctrl shows, but cursor is still an arrow
- do self.Freeze()
- do a wxCallAfter to prepare some additional notebook pages
- do self.Thaw() - in the routine called by wxCallAfter
- ONLY now shows the busy cursor
I am on wxPython 2.4.2.4 on WinXP Professional.
Tried using Yield, but same result, also tried SetCursor with no success.
Any hints on what I am doing wrong or not doing would be appreciated.
I am trying to get wxBeginBusyCursor() to work/show when it should!
I do the following:
- start the application
- load a frame and a menu
- call wxBeginBusyCursor() - but it doesn't show!!
- create a toolbar
- load a picture into the notebook
- do self.Show()
- do self.Freeze()
- connect to a db
- load a listctrl
- do self.Thaw() - listctrl shows, but cursor is still an arrow
- do self.Freeze()
- do a wxCallAfter to prepare some additional notebook pages
- do self.Thaw() - in the routine called by wxCallAfter
- ONLY now shows the busy cursor
I am on wxPython 2.4.2.4 on WinXP Professional.
Tried using Yield, but same result, also tried SetCursor with no success.
In the above is "self" the main frame of the application? Or is the above done before the MainLoop is started? If so, then try rearrainging things such that you get through the main frame's __init__ and into MainLoop as soon as possible, and then move the busy cursor and the time-consuming stuff into a function that is invoked via wxCallAfter after the MainLoop has started.
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I am trying to get wxBeginBusyCursor() to work/show when it should!
I changed this a little.
I do the following:
- start the application
- load a frame and a menu
- call wxBeginBusyCursor() - but it doesn't show!!
- create a toolbar
- load a picture into the notebook
- do self.Show()
- do self.Freeze()
- connect to a db
- load a listctrl
- do self.Thaw() - listctrl shows, but cursor is still an arrow
- do self.Freeze()
- do a wxCallAfter to prepare some additional notebook pages
- do self.Thaw() - in the routine called by wxCallAfter
- ONLY now shows the busy cursor
I am on wxPython 2.4.2.4 on WinXP Professional.
Tried using Yield, but same result, also tried SetCursor with no success.
In the above is "self" the main frame of the application?
Yes, self is the main frame.
Or is the above done before the MainLoop is started? If so, then try rearrainging things such that you get through the main frame's __init__ and into MainLoop as soon as possible, and then move the busy cursor and the time-consuming stuff into a function that is invoked via wxCallAfter after the MainLoop has started.
As this is during start up of application I changed things a bit, using a Splash screen and show the main application screen only after the slow stuff is done - which solves this particular case.
But I still have cases where I should show a BusyCursor and I just can't make it show when I want.