I am building a Python program that searches things on a remote website. Sometimes the operation takes many seconds and I believe that the user will not notice the status bar message "Search Operation in progress". Therefore, I would like to change the mouse cursor to highlight that the program is still waiting for a result.
这是我使用的方法:
def OnButtonSearchClick( self, event ):
"""
If there is text in the search text, launch a SearchOperation.
"""
searched_value = self.m_search_text.GetValue()
if not searched_value:
return
# clean eventual previous results
self.EnableButtons(False)
self.CleanSearchResults()
operations.SearchOperation(self.m_frame, searched_value)
我在最后一行之前尝试了两种不同的做法:
- wx.BeginBusyCursor()
- self.m_frame.SetCursor(wx.StockCursor(wx.CURSOR_WAIT))
他们都没有工作。
我在GNU/HCH下使用KE。 这也不是在格诺梅下工作的。
任何方面? 谢谢。