The `tkinter.Scale` widget displays a slider which can be moved along a bar to select a numerical value. There are many configuration elements like minimum, maximum, step size, label and a callback command to run if the value is being changed, for example.
Questions tagged [tkinter-scale]
70 questions
14
votes
3 answers
How can I set the default value of my tkinter Scale widget slider to 100?
How can I set the default value of my slider to 100 ?
self.slider = tk.Scale(self.leftFrame, from_=0, to=256, orient=tk.HORIZONTAL, command=updateValue)

aneuryzm
- 63,052
- 100
- 273
- 488
11
votes
3 answers
tkinter scale with two sliders?
Does anyone know if it is possible to have a single scale widget with two "sliders" from the tkinter module? Or anyway to fake it?
Such as (edited with GIMP):
I am thinking placing one scale on top of another scale, but with a transparent…

Onlyjus
- 5,799
- 5
- 30
- 42
8
votes
1 answer
How to use tkinter slider `Scale` widget with discrete steps?
Is it possible to have a slider (Scale widget in tkinter) where the possible values that are displayed when manipulating the slider are discrete values read from a list?
The values in my list are not in even steps and are situation dependent.
From…

Halldinz0r
- 195
- 1
- 12
5
votes
2 answers
How to use non-integer, float values for tkinter Scale widget scrollbar?
I need to set the scale from 0.55 to 2.75 with a very little interval for my slide
But all I get is a range from 1 to 3 with a scale of 1. Totally annoying.
TkInter documentation says it can handle floating values, so what's wrong?…

Alberto Patiño S
- 85
- 2
- 6
4
votes
2 answers
Why does holding down the 'X' button in a toplevel stop execution of main window in tkinter?
I have a program that needs to open Toplevel windows except the main Tk() window in tkinter.
In the main window I have a Scale widget which is updated every 100 miliseconds with the after call. However in a state where the Toplevel window is open…

Thalis
- 188
- 2
- 12
4
votes
1 answer
Setting `orient` keyword argument for Tkinter Scale widget results in NameError: name 'HORIZONTAL' is not defined
Here is my code:
import Tkinter
top = Tkinter.Tk()
top.geometry('600x600')
scale = Tkinter.Scale(top,from_=10,to=40, orient=HORIZONTAL)
scale.pack()
The following error appeared:
NameError: name 'HORIZONTAL' is not defined
I want to set my…

user2666750
- 582
- 1
- 7
- 11
4
votes
1 answer
How to make the slider of a Tkinter Scale widget start in certain place?
I am using the tkinter Scale widget and I have a scale set up from 0 to 200. When I open it up, I want the slider to be set at 100 (halfway on the trough) not 0. Is there a way for this to be done?

Kian Cross
- 1,818
- 2
- 21
- 41
3
votes
1 answer
Logarithmic scale in Tkinter scale
Is it possible to create a Tkinter scale widget with logaritmic values? Or, kind of, set the ticks to the corresponding value? I need a scale in the range of 10^4 to 10^9, with the exponent in whole numbers.
I was thinking about just labeling the…

Jakob
- 1,897
- 2
- 16
- 17
3
votes
1 answer
Python Tkinter slider customization
I'm new with tkinter, and I want to create a slider like the one in this picture:
But I have no idea if this is even possible, so my question is: Is this possible, and does someone has a quick tutorial or something for me?

Murat
- 101
- 2
- 8
3
votes
1 answer
Tkinter scale widget labeling
I am new to Tkinter and try to make a little password generator. For the length of the password I want to implement a Scale widget. I have a weird problem with displaying the labeling of the widget, I do not understand why I get two different…

adama
- 537
- 2
- 10
- 29
3
votes
0 answers
Tkinter scale's command being triggered when grid is called on button
I am attempting to create a layout using Tkinter for Python3 that involves several buttons and scales. The buttons work fine, but the command that I give to the scale widget is called when I call grid on the scale. Why is this happening and what…

DMAR
- 200
- 1
- 1
- 7
2
votes
1 answer
Tkinter scale gets stuck each time a function is called
I have a problem where the tkinter Scale widget seems to get stuck whenever I run a seemingly big function.
This is the code:
from tkinter import Tk, Button, Frame, Scale
root = Tk()
slider = Scale(root, orient='horizontal')
slider.pack()
frame =…

Thalis
- 188
- 2
- 12
2
votes
1 answer
How to customize the label of a tkinter Scale widget by adding a percentage sign
I'm working with a Tkinter scale, where the selected value is somewhere between 0 and 100, representing a percentage. Is there a way for the value displayed to have a % percent sign following it?
I want it to look like the following (roughly):
…

sas4740
- 4,510
- 8
- 26
- 23
2
votes
2 answers
How to retrieve the integer value of tkinter ttk Scale widget in Python?
Could anyone advise how to retrieve and update a Label widget with the value from a Scale widget in Python? Currently it shows a very large real number. I have tried to type cast the value but this only works when I print to idle. I tried…

Mixstah
- 411
- 1
- 7
- 22
2
votes
0 answers
Scale with variable resolution
I'm working on a paint application using Python's tkinter package.
I am making a Scale widget to handle zooming. I want the user to be able to zoom 0.5x, 1x, 2x, and 4x. The problem is, the resolutions are changing.
From 0.5 to 1 the resolution is…

Ogen
- 6,499
- 7
- 58
- 124