Advertisement
here2share

# Tk_enable_text_copy.py

May 23rd, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. # Tk_enable_text_copy.py
  2.  
  3. from Tkinter import *
  4.  
  5. root = Tk()
  6. T = Text(root, height=2, width=30, bg='lightgrey', relief='flat')
  7. T.insert(END, "Just a text Widget\nin two lines\n")
  8. T.config(state=DISABLED) # forbid text edition
  9. T.pack()
  10. mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement