I am having an issue with this dialog box that does not wish to update!
Here is the code of the Box
app = wx.PySimpleApp()
prodia = wx.ProgressDialog(“Feed Progress”,“Time Remaining”,len(items_to_do),style = wx.PD_AUTO_HIDE| wx.PD_ELAPSED_TIME | wx.PD_REMAINING_TIME)
Now i am calling update from worker threads and it won’t process the events! They are within scope! However they cannot update it!
I am having an issue with this dialog box that does not wish to update!
Here is the code of the Box
app = wx.PySimpleApp()
prodia = wx.ProgressDialog("Feed Progress","Time
Remaining",len(items_to_do),style = wx.PD_AUTO_HIDE| wx.PD_ELAPSED_TIME |
wx.PD_REMAINING_TIME)
Now i am calling update from worker threads and it won't process the events!
They are within scope! However they cannot update it!
Can someone please explain me why?
Hi James,
(Anyone, please correct me if I'm wrong, but ...) I believe the Update
call must be made from the main thread, as do any calls to any window.
Correct.
To make this happen from a worker thread you can use wx.CallAfter.
See: CallAfter - wxPyWiki