December 2015
Beginner to intermediate
350 pages
6h 49m
English
ScrolledText widgets are much larger than simple Entry widgets and span multiple lines. They are widgets like Notepad and wrap lines, automatically enabling vertical scrollbars when the text gets larger than the height of the ScrolledText widget.
This recipe extends the previous recipes. You can download the code for each chapter of this book from the Packt Publishing website.
By adding the following lines of code, we create a ScrolledText widget:
# Add this import to the top of the Python Module # 1 from tkinter import scrolledtext # 2 # Using a scrolled Text control # 3 scrolW = 30 # 4 scrolH = 3 # 5 scr = scrolledtext.ScrolledText(win, width=scrolW, height=scrolH, wrap=tk.WORD) # 6 scr.grid(column=0, ...
Read now
Unlock full access