JBecquer / KC-Flying-Club-Plane-Tracker

Generate a map of FCKC airplane tracks.
MIT License
0 stars 0 forks source link

Progress bar doesn't function correctly #2

Open JBecquer opened 2 years ago

JBecquer commented 2 years ago

Currently the TKinter message box that contains the progress bar created by "Get flight history" button does not function. It is empty until the script has already run, which defeats the entire point of having the progress bar.

Need to investigate a way to have the progress bar showing at the same time as the script is actively running.

Will likely require research into threading: https://www.pythontutorial.net/tkinter/tkinter-thread-progressbar/

JBecquer commented 1 year ago

Managed to get slight improvement by adding the code below. Now the progress bar populates correctly and general function is working. However, the progress bar is not moving. Needs more investigation.

update_idletasks() and update() is forcing the window to populate, and moves the progress bar a single tick per iteration because it is forcing an update. aircraft_progress.update_idletasks() aircraft_progress.update()