Changing the Size of the Scale

You can use the -length and -width options to change the size of the Scale. You can also change the size of the button displayed in the slider widget; to do so, use the -sliderlength option. It takes a value specified in screen units and will change the length of the slider button.

$mw->Scale(-sliderlength => 100); # make the button 100 pixels.

Figure 10-5 illustrates this.

Different -sliderlength values

Figure 10-5. Different -sliderlength values

Get Mastering Perl/Tk now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.