update enaml progress bar inside loop?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

update enaml progress bar inside loop?

Mike Sarahan
Hi there,

I'd like to add a progress bar to my Enaml UI.  When I set the trait that the ProgressBar is listening to as its value, the progress bar is not updated until the loop completes.  It makes sense to me - the loop is probably executing on the main GUI thread, and the progressbar updates can't execute until they have their turn on the thread.

I tried adding a thread to do update the trait, but these values still don't update the progress bar until the loop has completed.

I found this useful conversation:

I don't understand how to implement Chris' comment about getting back onto the main GUI thread.

I've attached a modified example of the progress_bar.enaml example that demonstrates the behavior.  I would be very appreciative if anyone could modify this example or otherwise point me in the right direction ( some place in the docs?)


Enthought-Dev mailing list
[hidden email]

progress_bar_loop.enaml (2K) Download Attachment