Answer the question
In order to leave comments, you need to log in
tkinter loading indicator?
I have created a loading indicator in my tkinter window that just keeps
looping Is it possible to make a function run when a certain percentage is reached?
The code:
from tkinter import *
from tkinter import ttk
from tkinter import Toplevel
root = Tk()
root.geometry('500x500')
root.title('Suck my dick')
pb = ttk.Progressbar(root,orient='horizontal',mode='determinate',length=200)
pb.pack()
pb.start()
root.mainloop()
Answer the question
In order to leave comments, you need to log in
In this case, progress is not measured in percentage terms.
You can check the value of the progress bar using if.
if pb['value'] == 10:
func()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question