How would i go about locking a Text widget so that the user can only select and copy text out of it, but i would still be able to insert text into the Text from a function or similar?
How would i go about locking a Text widget so that the user can
Share
Have you tried simply disabling the text widget?
On some platforms, you also need to add a binding on
<1>to give the focus to the widget, otherwise the highlighting for copy doesn’t appear:If you disable the widget, to insert programatically you simply need to
NORMALDISABLEDAs long as you don’t call
updatein the middle of that then there’s no way for the user to be able to enter anything interactively.