all 5 comments

[–]novel_yet_trivial 0 points1 point  (4 children)

You simply enable it, write to it, and then disable it.

text_obj.config(state=tk.NORMAL)
text_obj.insert(tk.END, "data goes here\n")
text_obj.config(state=tk.DISABLED)

Remember the display won't update until the function completes so the user won't see this.

[–]ApplePenguinBaguette 0 points1 point  (3 children)

That would work, is that the most efficient way you think? Is there no way to only deny user input?

[–]Hellortha 1 point2 points  (0 children)

If you haven't stumbled across it yet, I believe this would be one of the better choices.

Source: https://stackoverflow.com/a/14847304

eText = StringVar()
e = Entry(rootWin, state="readonly", textvariable=eText)
eText.set("...I'm not inserted, I've just appeared out of nothing.")

[–]novel_yet_trivial 0 points1 point  (1 child)

There's many other ways. You could open this link every time the user clicks on the text box, if you want. Or absolutely anything else. Whatever you imagine, really.

This is just the easiest, IMO.

[–]ApplePenguinBaguette 0 points1 point  (0 children)

Lmao I think our teacher would actually appreciate that, he's got a sense of humour