Updates progress bar smoothly over 10 seconds
(current_value, max_value)
| 1732 | |
| 1733 | |
| 1734 | def update_progress(current_value, max_value): |
| 1735 | """ Updates progress bar smoothly over 10 seconds """ |
| 1736 | if current_value < max_value: |
| 1737 | # current_value += 1 |
| 1738 | current_percentage = ((current_value) / max_value) * 100 |
| 1739 | progress_bar["value"] = current_percentage |
| 1740 | #root.after(max_value, update_progress, current_value) # Update every 100ms (10s total) |
| 1741 | root.update_idletasks() |
| 1742 | else: |
| 1743 | progress_frame.grid_forget() # Hide after completion |
| 1744 | |
| 1745 | root.mainloop() |
| 1746 |