-2

This is a sample of the code:

entry=Entry(root)
entry.insert(0, "This is a read-only widget")
entry.pack()

How to make this entry uneditable?

Reblochon Masque
  • 35,405
  • 10
  • 55
  • 80
  • Does this answer your question? [make-tkinter-entry-widget-readonly-but-selectable](https://stackoverflow.com/questions/3680301) – stovfl Jun 17 '20 at 11:57

1 Answers1

0

You can set the state option of the Entry to disabled:

import tkinter as tk

root = tk.Tk()

entry = tk.Entry(root) 
entry.insert(0, "This is a read-only widget")
entry.config(state='disabled')
entry.pack()

root.mainloop()
Reblochon Masque
  • 35,405
  • 10
  • 55
  • 80