The problem is that you are calling time.sleep(1)
in the same thread than your Tkinter code. It makes your GUI unresponsive until the task (in this case, the call to btn_start_click
) finishes. To solve this, you can start a new thread which executes that function, and update the progress bar in the GUI thread by using a synchronized object like Queue
. This is a working example I wrote for a similar question.
Besides, you should call self.counter.set(i)
instead of self.counter = i
to update the value of the IntVar. Another solution more explicit is self.download_bar.step()
with the appropiate increment.