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 tk
inter.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.
Example 2 : ScrolledText widget making tkinter text Read only.
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.
- Python Tkinter - Scale Widget
- Python Tkinter - MessageBox Widget
- Combobox Widget in tkinter | Python
- Python Tkinter - Menubutton Widget
- Python | Menu widget in Tkinter
- Python Tkinter - Frame Widget
- Python Tkinter - Entry Widget
- Python Tkinter - Checkbutton Widget
- Python Tkinter - Text Widget
- Python Tkinter - ListBox Widget
- Progressbar widget in Tkinter | Python
- Python Tkinter - Toplevel Widget
- Python | PanedWindow Widget in Tkinter
- Python Tkinter - Canvas Widget
- Python Tkinter - Validating Entry Widget
- Creating Tabbed Widget With Python-Tkinter
- Tkinter - Read only Entry Widget
- Create Find and Replace features in Tkinter Text Widget
- Tkinter | Adding style to the input text using ttk.Entry widget
- Python | Checkbox widget in Kivy
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.