Dec-24-2021, 11:40 AM
hi, sorry for my bad english,
i have this case:
and my question is, how make the "AddOne()" function or "Add 1" is called every 1 second?
I ask this because (as far I know) the python is procedural programming, and this task require Object Oriented one
thank you for reading, and have a nice day
i have this case:
import tkinter
TheWindow = tkinter.Tk()
def AddOne():
value = int(int(TextBox.get()) + 1)
TextBox.delete(0, tkinter.END)
TextBox.insert(0, str(value))
def RemOne():
value = int(int(TextBox.get()) - 10)
TextBox.delete(0, tkinter.END)
TextBox.insert(0, str(value))
PlusButton = tkinter.Button(TheWindow, text="Add 1", command = AddOne)
MinusButton = tkinter.Button(TheWindow, text="Remove 10", command = RemOne)
TextBox.insert(0, 0)
TextBox.pack()
PlusButton.pack()
MinusButton.pack()
TheWindow.mainloop()as you can see the program is very simple,and my question is, how make the "AddOne()" function or "Add 1" is called every 1 second?
I ask this because (as far I know) the python is procedural programming, and this task require Object Oriented one
thank you for reading, and have a nice day
