A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/python/python-tkinter-scrollbar/ below:

Python-Tkinter Scrollbar - GeeksforGeeks

Python-Tkinter Scrollbar

Last Updated : 12 Jul, 2025

Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter is the fastest and easiest way to create GUI applications. Creating a GUI using Tkinter is an easy task.

Note:

For more information, refer to

Python GUI – tkinter Scrollbar Widget

The scrollbar widget is used to scroll down the content. We can also create the horizontal scrollbars to the Entry widget.

Syntax:

The syntax to use the Scrollbar widget is given below.

w = Scrollbar(master, options) 
Parameters: Options:

Following are commonly used Option can be used with this widget :-

Methods:

Methods used in this widgets are as follows:

Example: Python3 1==
from tkinter import *

root = Tk()
root.geometry("150x200")
 
w = Label(root, text ='GeeksForGeeks',
          font = "50") 

w.pack()
 
scroll_bar = Scrollbar(root)

scroll_bar.pack( side = RIGHT,
                fill = Y )
 
mylist = Listbox(root, 
                 yscrollcommand = scroll_bar.set )
 
for line in range(1, 26):
    mylist.insert(END, "Geeks " + str(line))

mylist.pack( side = LEFT, fill = BOTH )

scroll_bar.config( command = mylist.yview )
 
root.mainloop()
Output:

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4