-1

so i have made a progress bar for my code, it is purely cosmetic and is just there to be a kind of "bootup animation" for when i launch the program. however, the progress bar is not working as i would want it to. instead of popping up immediately and showing the progress, it waits a couple of seconds then pops up once it is completed. that destroys the entire point of a progress bar. how can i fix it it: enter image description here

starting lines:

enter image description here

  • you have to manually update tk windows if they are not in their main loop with ttk.update() or ttk.update_idletasks() like [here](https://stackoverflow.com/a/57172767/5124383) – Finn May 31 '22 at 08:27
  • Does this answer your question? [How to update the ttk progress bar on tkinter](https://stackoverflow.com/questions/57171675/how-to-update-the-ttk-progress-bar-on-tkinter) – Finn May 31 '22 at 08:28
  • @Finn okay, so i took a look at the link you gave me, and I added the window.update_idletasks(), but changed it to say progressbar.update_idletasks() instead because i dont want it in a separate window, but on the main screen. the problem still persists though. – Leander Brough May 31 '22 at 09:52
  • if it is a part from another screen you have to update that, not the progressbar. It is often called `root` but it is not here in the code. – Finn May 31 '22 at 10:54
  • @Finn okay, i understand. unfortunately root does not work, neither does screen or setup. i added a picture in my post of my starting lines, where i made the screen. it is not a separate window. I use repl.it if that is of any use. – Leander Brough May 31 '22 at 12:21
  • Unfortunately it cannot be checked like this. Could you please copy add all the code and the actual code (not a picture of it) in your question? – Finn May 31 '22 at 12:25
  • Could the issue be that your time.sleep(2) is outside the for-loop, causing it to hit a value of 100 extremely fast? – Florian Aendekerk May 31 '22 at 13:10
  • Please [don't ***ever*** use images of code.](https://meta.stackoverflow.com/a/285557/16775594). Instead, [edit] your question to show the code as [properly formatted text](https://stackoverflow.com/help/formatting). – Sylvester Kruin May 31 '22 at 14:03

0 Answers0