It doesn't look like it has that attribute, but it'd be really useful to me.
Text. insert(position, text, taglist) to add it to your readonly Text box window under a tag.
To disable the Entry widget, use state='disabled' property in the constructor.
To enter multiple lines of text, use the Text widget. Entry in the Tkinter reference starts with: The purpose of an Entry widget is to let the user see and modify a single line of text. If you want to display multiple lines of text that can be edited, see Section 24, “The Text widget”.
You have to change the state of the Text
widget from NORMAL
to DISABLED
after entering text.insert()
or text.bind()
:
text.config(state=DISABLED)
text = Text(app, state='disabled', width=44, height=5)
Before and after inserting, change the state, otherwise it won't update
text.configure(state='normal') text.insert('end', 'Some Text') text.configure(state='disabled')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With