I need read-only text fields, but setting the property to disabled used a style that was incorrect in the context (in my script, the text field was entered into the search function, where the value could be fixed in some cases - disabling the text field implies that it was not part of search, but was not fixed).
I ended up landing using:
txtInput.setEditable(false); txtInput.setMouseTransparent(true); txtInput.setFocusTraversable(false);
The result is a normal text field that does not respond to the user.
andrew-g-za
source share