Script Syntax for disabling a text field after the text has been updated

I would like to have a method where I can enter a string into a text field and then disable the text field so that the string is "locked". I can reenable the field later by clicking another button.

TIA.

(The text field is 'locked' when I press the Enter key. So basically, when the text property is updated.)

Please edit your question and add the Perspective or Vision tag so we know how to answer. Thanks.

This is for Vision. I'm looking at general syntax to do this. No tags involved.

I've added the tag in the question title.

If Defer Updates is true, then you would just add a script to the propertyChange event handler, something like:

if event.propertyName == "text":
	event.source.editable = False
1 Like