Hello. This seems related to my issue. I need to submit a project in python (which I am not really good at). I am looking to replicate something like ... So far, I took help from a few forums and have reached up to this -
Can someone please help add the code to this? it'll really help me pass in this project. TIA.
import tkinter as tk from tkinter import ttk count = 0 def clicked(): # without event because I use `command=` instead of `bind` global count count = count + 1 label1.configure(text=f'Button was clicked {count} times!!!') windows = tk.Tk() windows.title("My Application") label = tk.Label(windows, text="Hello World") label.grid(column=0, row=0) label1 = tk.Label(windows) label1.grid(column=0, row=1) custom_button = ttk.Button(windows, text="Click on me", command=clicked) custom_button.grid(column=1, row=0) windows.mainloop()Now, I am able to count the clicks succesfully... but don't know how to add a timer to it. I need a simple 10 sec countdown timer after which the click counting should stop.
Can someone please help add the code to this? it'll really help me pass in this project. TIA.
Larz60+ write Mar-20-2022, 06:10 PM:
Link removed for same reason shown in post 5
Link removed for same reason shown in post 5