Introduction
Software requirement
Python 3.5 and IDLE (Python 3.5)
Programming code
- #Create Scrolled Text widget in Python GUI Application
- import tkinter as tk
- from tkinter import ttk
- from tkinter import scrolledtext
- win = tk.Tk()
- win.title("Python GUI App")
- ttk.Label(win, text="This is Scrolled Text Area").grid(column=0,row=0)
- #Create Scrolled Text
- scrolW=30
- scrolH=2
- scr=scrolledtext.ScrolledText(win, width=scrolW, height=scrolH, wrap=tk.WORD)
- scr.grid(column=0, columnspan=3)
- #Calling Main()
- win.mainloop()
About the code
- First, I am importing the tkinter modules.
- Next, I assign a class and variables and give the application title.
- Next, I created the scrolled text area.
- Finally, I have started the Windows event loop by calling the mainloop method.
- And, I execute the code.
Output

Join the conversation! Your thoughts help the community grow.