13. Tkinter: ScrollText

Subscribers:
5,850
Published on ● Video Link: https://www.youtube.com/watch?v=B2ktKJow4wU



Duration: 3:40
2,645 views
0


Video code

#Imports the Tkinter Library
from tkinter import*

#Creates a new window
master=Tk()
#Changes the title of the window
master.title("My title")
#Changes the background of the window
master.configure(background='white')
#Changes the size of the window
master.geometry("350x200")

scrText=scrolledtext.ScrolledText(master, wrap=WORD)
scrText.pack()

scrText.insert('insert',"Hello \n\n\n\n\n")
scrText.insert('insert',"Hello \n\n\n\n\n")
scrText.insert('insert',"Hello \n\n\n\n\n")
scrText.insert('insert',"Hello \n\n\n\n\n")
scrText.insert('insert',"Hello \n\n\n\n\n")

scrText.config(state=DISABLED)







Tags:
tkinter
python
intro
introduction
tutorial
keyboard
notebook
scroll
text
entry
buttons
radio
combo
checkbox
scales
sliders