Progressbar (ttk.Progressbar) with python in tkinter not showing Progressbar (ttk.Progressbar) with python in tkinter not showing tkinter tkinter

Progressbar (ttk.Progressbar) with python in tkinter not showing


In order for the a widget to appear after being created, the event loop must be allowed to run. That is because the actual drawing of the widget on the screen happens as a result of a redraw event.

You can call update_idletasks which will allow the event loop to service such redraw events, after creating and starting the progress bar. However, while your calculation is running your app will likely appear to be frozen. Again, this is because the event loop must be allowed to service events, which it can't do when doing other things.

The normal way to solve this problem is to run your long running calculation in a thread or separate process.