In this Tkinter example tutorial let us create a scrolled text widget on the previously created top-level window. First of all, the width and height of the scrolled text widget are as follows:
scrollWidth = 30 scrollHeight = 3
Below is the entire python code which produced the scrolled text widget.
# create a scrolled text widget scrollWidth = 30 scrollHeight = 3 scroll = scrolledtext.ScrolledText(win, width=scrollWidth, height=scrollHeight, wrap=tk.WORD) scroll.grid(column=0, row=2, columnspan=2)
You can refer to the previous article about Tkinter to look at the entire program as I am not going to repeat it again in this article.