Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- root = Tk()
- root.resizable(width=False, height=False)
- S = Scrollbar(root)
- T = Text(root,state='disabled', height=30, width=100)
- T.configure(state="normal")
- S.pack(side=RIGHT, fill=Y)
- T.pack(side=LEFT, fill=Y)
- S.config(command=T.yview)
- T.config(yscrollcommand=S.set)
- quote = """HAMLET: To be, or not to be--that is the question:
- Whether 'tis nobler in the mind to suffer
- The slings and arrows of outrageous fortune
- Or to take arms against a sea of troubles
- And by opposing end them. To die, to sleep--
- No more--and by a sleep to say we end
- The heartache, and the thousand natural shocks
- That flesh is heir to. 'Tis a consummation
- Devoutly to be wished."""
- T.insert(END, quote)
- T.configure(state="disabled")
- mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement