Tkinter - Spinbox - How can I get traced values into a variable?
问题 How can I get the traced values from a Tkinter Spinbox in the below modified code (https://stackoverflow.com/a/59326732/7681357) into a variable so I can then use it as a timestamp? I have added the print to get a visual confirmation that the change is actually being traced but when I added b = tk.Button(text='get', command=App(root).trace_varhour) b.pack() just before the root.mainloop() it returned 13 which is the default value and not the traced. import tkinter as tk class App(tk.Frame):