Hi, I'm trying to put sleep action on my program, but I would like program to sleep after I (as user)click and when he changes the picture on the button. and I don't know where to put it.
please help
this is example of code :)
import tkinter as tk
from functools import partial
def klik(n):
button[n].config(image=s[n])
root = tk.Tk()
frame1 = tk.Frame(root)
frame1.pack(side=tk.TOP, fill=tk.X)
karirano = tk.PhotoImage(file="kari.GIF")
s = list(tk.PhotoImage(file="%d.GIF" % (i+1)) for i in range(4))
button = list()
for i in range(4):
button.append(tk.Button(frame1, image=karirano, command=partial(klik, i)))
button[-1].grid(row=0,column=i)
root.mainloop()