Tkinter is a GUI toolkit used in python to make user-friendly GUIs.Tkinter is the most commonly used and the most basic GUI framework available in python. Tkinter uses an object-oriented approach to make GUIs.
Note: For more information, refer to Python GUI – tkinter
The Scale widget is used whenever we want to select a specific value from a range of values. It provides a sliding bar through which we can select the values by sliding from left to right or top to bottom depending upon the orientation of our sliding bar.
S = Scale(root, bg, fg, bd, command, orient, from_, to, ..)
- root – root window.
- bg – background colour
- fg – foreground colour
- bd – border
- orient – orientation(vertical or horizontal)
- from_ – starting value
- to – ending value
- troughcolor – set colour for trough.
- state – decides if the widget will be responsive or unresponsive.
- sliderlength – decides the length of the slider.
- label – to display label in the widget.
- highlightbackground – the colour of the focus when widget is not focused.
- cursor – The cursor on the widget ehich could be arrow, circle, dot etc.
- set(value) – set the value for scale.
- get() – get the value of scale.
Example 1: Creating a horizontal bar
Example 2: Creating a vertical slider
- Python Tkinter - ScrolledText Widget
- Python Tkinter - ListBox Widget
- Python Tkinter - Checkbutton Widget
- Combobox Widget in tkinter | Python
- Python | Menu widget in Tkinter
- Python Tkinter - Toplevel Widget
- Python | PanedWindow Widget in Tkinter
- Progressbar widget in Tkinter | Python
- Python Tkinter - Entry Widget
- Python Tkinter - Canvas Widget
- Python Tkinter - MessageBox Widget
- Python Tkinter - Menubutton Widget
- Python Tkinter - Frame Widget
- Python Tkinter - Text Widget
- Creating Tabbed Widget With Python-Tkinter
- Python Tkinter - Validating Entry Widget
- Tkinter - Read only Entry Widget
- Tkinter | Adding style to the input text using ttk.Entry widget
- Create Find and Replace features in Tkinter Text Widget
- Wand scale() function - Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.