Can I set the command function for a tkinter scale later on in the code?
Question:
I want to define a tk.Scale
widget and assing the command function LATER ON. I’m think of something similar to scale.set() but for the command option. Is there a way to do this?
Answers:
Nearly all options of all widgets can be configured at any time via the configure
and config
methods (one is a synonym for the other).
scale = tk.Scale(…)
…
scale.configure(command=the_command)
I want to define a tk.Scale
widget and assing the command function LATER ON. I’m think of something similar to scale.set() but for the command option. Is there a way to do this?
Nearly all options of all widgets can be configured at any time via the configure
and config
methods (one is a synonym for the other).
scale = tk.Scale(…)
…
scale.configure(command=the_command)