UI component on read-only

UI components can be set to read-only if required. This state is mainly needed for form components. In the read-only state, the UI components are displayed with a light gray background. Input, a selection of options as well as the selection of the UI component is then no longer possible. In contrast to the deactivated state, events can be registered and button actions executed in the read-only state.

Property:

ReadOnly - The flag sets the UI component in the GUI builder and initially at runtime to ReadOnly or cancels the ReadOnly state. The property is located under Misc for some UI components.

Example:

  • Set UI component dynamically to ReadOnly.

    button.setReadOnly(true);

image not found

  • Cancel ReadOnly state dynamically.

    button.setReadOnly(false);

image not found