I was looking for some help on changing the mouse pointer from normal to an
hourglass while my app does some processing then setting it back to normal
when it is done.
I have tried self.SetCursor(wxCURSOR_WAIT) but I get this traceback:
Traceback (most recent call last):
File "wxFrameDocuParse.py", line 118, in OnBtnparseButton
self.SetCursor(wxCURSOR_WAIT)
File "c:\python21\wxPython\windows.py", line 418, in SetCursor
val = apply(windowsc.wxWindow_SetCursor,(self,) + _args, _kwargs)
TypeError: Type error in argument 2 of wxWindow_SetCursor. Expected
_wxCursor_p.
Thanks,
--zDweeB
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.
ASCII art?? I thought it was a regular expression!
HOWEVER, this works a lot better on Windows than on Linux. For some
reason, on Linux, the cursor doesn't change until the process is
almost done, which means the user is left clueless with an apparently
frozen app for quite some time.
Anyone know a fix?
>>>>> "WV" == William Voll <zdw...@hotmail.com> writes:
WV> Hi All,
WV> I was looking for some help on changing the mouse pointer from normal to an
WV> hourglass while my app does some processing then setting it back to normal
WV> when it is done.
I use the following pattern:
wxBeginBusyCursor()
try:
# whatever
finally:
wxEndBusyCursor()
> _______________________________________________
> wxpython-users mailing list
> wxpytho...@lists.wxwindows.org
> http://lists.wxwindows.org/mailman/listinfo/wxpython-users
--
Riaan Booysen
___________________________________________________
Boa Constructor - RAD GUI building IDE for wxPython
http://boa-constructor.sourceforge.net
>> HOWEVER, this works a lot better on Windows than on Linux. For some
>> reason, on Linux, the cursor doesn't change until the process is
>> almost done, which means the user is left clueless with an apparently
>> frozen app for quite some time.
RD> A lot of the UI updates on wxGTK don't actually happen until the app is
RD> idle. This is an optimizations to help reduce flicker, redundant updating,
RD> etc.
>> Anyone know a fix?
RD> As Mike said, try wxYield or wxSafeYield.
Thanks, wxYield did the trick.
--Patricia
This form of the constructor is called wxStockCursor, but for just doing
temporary busy cursors there are easier ways to do it, as others have
already shown.
--
Robin Dunn
Software Craftsman
ro...@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!
A lot of the UI updates on wxGTK don't actually happen until the app is
idle. This is an optimizations to help reduce flicker, redundant updating,
etc.
> Anyone know a fix?
As Mike said, try wxYield or wxSafeYield.
--
wxBeginBusyCursor()
try:
# whatever
finally:
wxEndBusyCursor()
It worked just fine :)
BTW Great job on BOA Riaan!
HTH,
Mike
Anyone know a fix?
WV> Hi All,