[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-devel] Busy Cursor Code Snippets
From: |
Richard Terry |
Subject: |
[Gnumed-devel] Busy Cursor Code Snippets |
Date: |
Thu, 29 Jul 2004 14:29:53 +1000 |
User-agent: |
KMail/1.5.4 |
To whoever may be capable/interested. From the wxPython list are some code
snippets for setting the cursor to (I think) hourglass whilst doing something
(such as finding patient record).
Snipped are a few messages saying what works/doesn't. Perhaps someone with the
ability can insert this say in the find-patient to actually indicate the
program is doing something.
Richard
=============================
def workingStatus (self, mode):
self.statusBar.text=mode
if mode=='Working':
dowait=wx.wxBusyCursor()
else:
dowait=None
When I call the function with this command:
self.workingStatus('Working')
Yes, your solution seems to work visually but now I get an error in the
console:
line 28, in workingStatus
wx.EndBusyCursor()
line 250, in EndBusyCursor
return _misc.EndBusyCursor(*args, **kwargs)
wx.core.PyAssertionError: C++ assertion "wxAssertFailure" failed in
..\..\src\ms
w\utilsgui.cpp(176): no matching wxBeginBusyCursor() for
wxEndBusyCursor()
I think it should look more like this:
def workingStatus(self, mode):
self.statusBar.text=mode
if mode==;Working':
wx.BeginBusyCursor()
else:
wx.EndBusyCursor()
But that being said, I've only used this in the demo code. If this
function doesn't get called at the end of the time you want the Busy
Cursor, you'll want to move the EndBusyCursor call.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnumed-devel] Busy Cursor Code Snippets,
Richard Terry <=