Home > Mobile >  Can I set the command function for a tkinter scale later on in the code?
Can I set the command function for a tkinter scale later on in the code?

Time:07-29

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?

CodePudding user response:

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)

  • Related