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?
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?
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()