We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

The Tkinter Scale Class

Scale(master=None, **options) (class) [#]

A scale (slider).

master
Parent widget.
**options
Widget options. See the description of the config method for a list of available options.

config(**options) [#]

Modifies one or more widget options. If no options are given, the method returns a dictionary containing all current option values.

**options
Widget options.
activebackground=
Default value is system specific. (the database name is activeBackground, the class is Foreground)
background=
Default value is system specific. (background/Background)
bg=
Same as background.
bigincrement=
Default value is 0. (bigIncrement/BigIncrement)
borderwidth=
Default value is 2. (borderWidth/BorderWidth)
bd=
Same as borderwidth.
command=
No default value. (command/Command)
cursor=
No default value. (cursor/Cursor)
digits=
Default value is 0. (digits/Digits)
font=
Default value is system specific. (font/Font)
foreground=
Default value is system specific. (foreground/Foreground)
fg=
Same as foreground.
from=
Default value is 0. (from/From)
highlightbackground=
Default value is system specific. (highlightBackground/HighlightBackground)
highlightcolor=
Default value is system specific. (highlightColor/HighlightColor)
highlightthickness=
Default value is 2. (highlightThickness/HighlightThickness)
label=
No default value. (label/Label)
length=
Default value is 100. (length/Length)
orient=
Default value is VERTICAL. (orient/Orient)
relief=
Default value is FLAT. (relief/Relief)
repeatdelay=
Default value is 300. (repeatDelay/RepeatDelay)
repeatinterval=
Default value is 100. (repeatInterval/RepeatInterval)
resolution=
Default value is 1. (resolution/Resolution)
showvalue=
Default value is 1. (showValue/ShowValue)
sliderlength=
Default value is 30. (sliderLength/SliderLength)
sliderrelief=
Default value is RAISED. (sliderRelief/SliderRelief)
state=
Default value is NORMAL. (state/State)
takefocus=
No default value. (takeFocus/TakeFocus)
tickinterval=
Default value is 0. (tickInterval/TickInterval)
to=
Default value is 100. (to/To)
troughcolor=
Default value is system specific. (troughColor/Background)
variable=
No default value. (variable/Variable)
width=
Default value is 15. (width/Width)

coords(value=None) [#]

Gets the screen coordinate corresponding to the given scale value.

value
A scale value. If omitted, this method uses the current setting.
Returns:
The corresponding screen coordinate, as a 2-tuple.

get() [#]

Gets the current scale value. Tkinter returns an integer if possible, otherwise a floating point value.

Returns:
The current value, as an integer or floating point value. To make sure you have a floating point value, use float(scale.get()).

identify(x, y) [#]

Checks if an active part of the scale is at the given screen location.

x
The horisontal screen coordinate.
y
The vertical screen coordinate.
Returns:
A string identifying what part of the scale is at the given location. This can be “slider”, “through1” (above or to the left of the slider), “through2” (below or to the right), or an empty string for any other part of the widget.

set(value) [#]

Sets the scale value.

value
The new scale value.