May-11-2020, 07:09 PM
Is there a way to disable an entry field and yet still see the value in it? For Tkinter.
Disable entry field and still see value
|
May-11-2020, 07:09 PM
Is there a way to disable an entry field and yet still see the value in it? For Tkinter.
May-11-2020, 07:27 PM
Haven't tested it. But what a search turned up.
https://stackoverflow.com/questions/1987...able-entry
I welcome all feedback.
The only dumb question, is one that doesn't get asked. My Github How to post code using bbtags Download my project scripts
May-11-2020, 07:37 PM
Yeh. I know how to disable the entry but when it's disabled, I still need to see the value in the entry field.
May-11-2020, 07:51 PM
This works
import tkinter as tk root = tk.Tk() en = tk.Entry(root) en.insert(0, 'some text here') en.configure(state=tk.DISABLED) en.pack() root.mainloop()
I welcome all feedback.
The only dumb question, is one that doesn't get asked. My Github How to post code using bbtags Download my project scripts
May-11-2020, 07:57 PM
That worked. Thank you!
On a side note you can change the foreground and background colors in the configure
en.configure(state='tk.DISABLED', disabledbackground='white', disabledforeground='red')
I welcome all feedback.
The only dumb question, is one that doesn't get asked. My Github How to post code using bbtags Download my project scripts |
|