listbox append in for loop

Christian K. ckkart at hoc.net
Tue Jul 3 22:29:05 PDT 2007


Thomas Thomas wrote:
> Hi All,
> 
> I am writing a small application that migrates data. I am appending the process log on to a listbox. But only after the loops finishes the user can actually see the elements in the listbox.. I tried using listbox.Refresh(). the process and logging are done on the main thread.

Add a wx.Yield() somewhere in your loop to allow the program to return 
to the wxPython main loop after an item has been added.

Christian






More information about the wxpython-users mailing list