O'Reilly logo

Mastering Perl/Tk by Nancy Walsh, Stephen Lidie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Assigning a Callback

As usual, use the -command option to assign a callback for the widget. The callback is invoked every time the Scale value is changed. If you change the value from 50 to 100 and the Scale increment is 1, the callback will be invoked 50 times. The callback is also called when the widget is created. My recommendation is not to use -command unless you have a small number of possible values.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required