The Scale widget is used to implement the graphical slider to the python application so that the user can slide through the range of values shown on the slider and select the one among them.
We can control the minimum and maximum values along with the resolution of the scale. It provides an alternative to the Entry widget when the user is forced to select only one value from the given range of values.
The syntax to use the Scale widget is given below.
A list of possible options is given below.
||The background color of the widget when it has the focus.
||The background color of the widget.
||The border size of the widget. The default is 2 pixel.
||It is set to the procedure which is called each time when we move the slider. If the slider is moved rapidly, the callback is done when it settles.
||The mouse pointer is changed to the cursor type assigned to this option. It can be an arrow, dot, etc.
||If the control variable used to control the scale data is of string type, this option is used to specify the number of digits when the numeric scale is converted to a string.
||The font type of the widget text.
||The foreground color of the text.
||It is used to represent one end of the widget range.
||The highlight color when the widget doesn't have the focus.
||The highlight color when the widget has the focus.
||This can be set to some text which can be shown as a label with the scale. It is shown in the top left corner if the scale is horizontal or the top right corner if the scale is vertical.
||It represents the length of the widget. It represents the X dimension if the scale is horizontal or y dimension if the scale is vertical.
||It can be set to horizontal or vertical depending upon the type of the scale.
||It represents the type of the border. The default is FLAT.
||This option tells the duration up to which the button is to be pressed before the slider starts moving in that direction repeatedly. The default is 300 ms.
||It is set to the smallest change which is to be made to the scale value.
||The value of the scale is shown in the text form by default. We can set this option to 0 to suppress the label.
||It represents the length of the slider window along the length of the scale. The default is 30 pixels. However, we can change it to the appropriate value.
||The scale widget is active by default. We can set this to DISABLED to make it unresponsive.
||The focus cycles through the scale widgets by default. We can set this option to 0 if we don't want this to happen.
||The scale values are displayed on the multiple of the specified tick interval. The default value of the tickinterval is 0.
||It represents a float or integer value that specifies the other end of the range represented by the scale.
||It represents the color of the through.
||It represents the control variable for the scale.
||It represents the width of the through part of the widget.