Brian,
I have an application that used to do something like:
wx.BeginBusyCursor()
for Obj in Objects:
Obj.DoSomething(WithArgs)
wx.EndBusyCursor()This has now been replaced with a threaded version of this:
class obj():
active=set()def Begin(self):
wx.BeginBusyCursor()
for obj in objects:
self.active.add(obj)
threadedThing(obj, args)def OnData(self, event)
"""when a threadedThing finishes"""
self.active.remove(event.obj)
if not self.active:
wx.EndBusyCursor()(Codes are very skeleton, just to give you an idea of what is happening.)
Admittedly this works perfectly, but since the program is no longer deadlocked during DoSomething as it once was, I was hoping to use the "semi-busy" cursor (the one with the pointer and the hourglass) since the user can now actually interact with the program while it is "busy."
I have been googling everything I can think of, and can't seem to find anything about this. This site ( http://www.wxpython.org/docs/api/frames.html ) seems to have most of the wx functions and has nothing like what I am looking for (that I can tell). Does this option even exist? if so where can I find it?
-Brian
Brian Fett
1280 Disc Dr
SHK224
Shakopee, MN 55379Phone: (952)402-2595
Brian.D.Fett@seagate.com
I think you are looking for the SetCursor() method. I found a recipe that illustrates its use here:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/189744
Or something like this should work:
<code>
# create a cursor instance
# wx.Cursor(path\to\file, wx.BITMAP_TYPE* constant)
myCurs = wx.Cursor(r'C:\WINDOWS\Cursors\3dgarro.cur', wx.BITMAP_TYPE_CUR)
# self is a wx.Frame in my example
self.SetCursor(myCurs)
</code>
Good luck!
···
-------------------
Mike Driscoll
Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org