Python Tkinter - ScrolledText Widget Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report Tkinter is a built-in standard python library. With the help of Tkinter, many GUI applications can be created easily. There are various types of widgets available in Tkinter such as button, frame, label, menu, scrolledtext, canvas and many more. A widget is an element that provides various controls. ScrolledText widget is a text widget with a scroll bar. The tkinter.scrolledtext module provides the text widget along with a scroll bar. This widget helps the user enter multiple lines of text with convenience. Instead of adding a Scroll bar to a text widget, we can make use of a scrolledtext widget that helps to enter any number of lines of text. Example 1 : Python code displaying scrolledText widget. Python3 # Python program demonstrating # ScrolledText widget in tkinter import tkinter as tk from tkinter import ttk from tkinter import scrolledtext # Creating tkinter main window win = tk.Tk() win.title("ScrolledText Widget") # Title Label ttk.Label(win, text = "ScrolledText Widget Example", font = ("Times New Roman", 15), background = 'green', foreground = "white").grid(column = 0, row = 0) # Creating scrolled text # area widget text_area = scrolledtext.ScrolledText(win, wrap = tk.WORD, width = 40, height = 10, font = ("Times New Roman", 15)) text_area.grid(column = 0, pady = 10, padx = 10) # Placing cursor in the text area text_area.focus() win.mainloop() Output : Example 2 : ScrolledText widget making tkinter text Read only. Python3 # Importing required modules import tkinter as tk import tkinter.scrolledtext as st # Creating tkinter window win = tk.Tk() win.title("ScrolledText Widget") # Title Label tk.Label(win, text = "ScrolledText Widget Example", font = ("Times New Roman", 15), background = 'green', foreground = "white").grid(column = 0, row = 0) # Creating scrolled text area # widget with Read only by # disabling the state text_area = st.ScrolledText(win, width = 30, height = 8, font = ("Times New Roman", 15)) text_area.grid(column = 0, pady = 10, padx = 10) # Inserting Text which is read only text_area.insert(tk.INSERT, """\ This is a scrolledtext widget to make tkinter text read only. Hi Geeks !!! Geeks !!! Geeks !!! Geeks !!! Geeks !!! Geeks !!! Geeks !!! """) # Making the text read only text_area.configure(state ='disabled') win.mainloop() Output : In the first example, as you can see the cursor, the user can enter any number of lines of text. In the second example, the user can just read the text which is displayed in the text box and cannot edit/enter any lines of text. We may observe that the scroll bar disappears automatically if the text entered by the user is less than the size of the widget. Comment More infoAdvertise with us Next Article Python Tkinter - ScrolledText Widget G greeshmanalla Follow Improve Article Tags : Python Write From Home Python-tkinter Python Tkinter Widget Practice Tags : python Similar Reads What are Widgets in Tkinter? Tkinter is Python's standard GUI (Graphical User Interface) package. tkinter we can use to build out interfaces - such as buttons, menus, interfaces, and various kind of entry fields and display areas. We call these elements Widgets.What are Widgets in Tkinter?In Tkinter, a widget is essentially a g 3 min read Basic Tkinter WidgetPython Tkinter - Label Tkinter Label is a widget that is used to implement display boxes where you can place text or images. The text displayed by this widget can be changed by the developer at any time you want. It is also used to perform tasks such as underlining the part of the text and spanning the text across multipl 4 min read Python Tkinter - Create Button Widget The Tkinter Button widget is a graphical control element used in Python's Tkinter library to create clickable buttons in a graphical user interface (GUI). It provides a way for users to trigger actions or events when clicked.Note: For more reference, you can read our article:What is WidgetsPython Tk 6 min read Python Tkinter - Entry Widget Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. Python with Tkinter is the fastest and easiest way to create GUI applications. Creating a GUI using Tkinter is an easy task.In Python3 Tkinter is come 5 min read Python Tkinter - Frame Widget Python offers multiple options for developing 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 applicatio 3 min read Python Tkinter - Checkbutton Widget The Checkbutton widget is a standard Tkinter widget that is used to implement on/off selections. Checkbuttons can contain text or images. When the button is pressed, Tkinter calls that function or method. Note: For more reference, you can read our article, What is WidgetsPython Tkinter OverviewPytho 5 min read RadioButton in Tkinter | Python The Radiobutton is a standard Tkinter widget used to implement one-of-many selections. Radiobuttons can contain text or images, and you can associate a Python function or method with each button. When the button is pressed, Tkinter automatically calls that function or method.Syntax:  button = Radio 4 min read Python Tkinter - ListBox Widget 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 ListBox widget The ListBox widg 2 min read Python-Tkinter Scrollbar 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 applicat 3 min read Like