Jun-06-2019, 12:14 PM
Hello everyone,
I need help to make simple clock app which will change background color in choosen periods with duration for few secc and after then transform back. I created simple clock with tkinter, which you can see bellow, but I have problem with conditions of the changing of background color. I will appreciate any idea. thanks
I need help to make simple clock app which will change background color in choosen periods with duration for few secc and after then transform back. I created simple clock with tkinter, which you can see bellow, but I have problem with conditions of the changing of background color. I will appreciate any idea. thanks
import sys from tkinter import * import time def tick(): time_string=time.strftime("%H:%M:%S") clock.config(text=time_string) clock.after(200,tick) root=Tk() clock=Label(root, font=("times", 100, "bold"), bg="red") clock.grid(row=0, column=1) tick() root.mainloop()