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?

Asked By: Mcabrera

||

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)

Answered By: Bryan Oakley
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.