Hello, I don't have a runnable expample, so I try to show with pseudo code_
In a thread, I have a loop, which should update a dialog with progress bar.
Examplecode in thread:
while i < 10:
event = wx.CommandEvent ()
event.SetEventType (wx.wxEVT_COMMAND_BUTTON_CLICKED)
event.SetId (9999)
wx.PostEvent(self.m_pWndProgress, event) # this shall call OnUpdateProgress
print "post event"
# is here something missing, so that the UI is getting the posted events?
#time.sleep(0.1)
++i
in Progress dialog
wx.EVT_BUTTON(self, 9999, self.OnUpdateProgress)
def OnUpdateProgress(self, event):
print 'update'
output is:
post event
post event
...
post event
post event
update
update
...
update
update
so the update is not called before all PostEvents are delivered.
What do I have to to to get the OnUpdateProgress processed immediatly?