enable specifies whether any user interaction can be performed with a widget (i.e. whether it is active or not).
Form XML code:
The property value will appear in the form XML code only once it is set explicitly (the Properties view will change as well):
Possible values:
true, false
Default value:
true
Associated containers and widgets:
Associated 4gl syntax:
Associated ui methods:
SetEnable ↓
GetEnable
Influence and behavior:
With the enable property set to false, widgets and containers become inactive at runtime:
property set in the form |
|
runtime appearance |
|
There are three methods to enable/disable a widget at runtime.
CALL widget_id.SetEnable(TRUE)
lycia form designer |
|
4gl code sample |
MAIN DEFINE bt_ui ui.Button, tf_ui ui.TextField OPEN WINDOW w1 WITH FORM "ui_enable" ATTRIBUTE(BORDER) LET bt_ui = ui.Button.forName("bt1") CALL bt_ui.setEnable(TRUE) LET tf_ui = ui.TextField.forName("tf1") CALL tf_ui.setEnable(TRUE) CALL fgl_getkey() END MAIN |
runtime behavior |
|
DISPLAY "!"
TO
widget_id
- to activate an inactive widget;
DISPLAY
"*"
TO widget_id
- to deactivate an active widget.
|
|
DISPLAY "!" TO and DISPLAY "*" do not affect action widgets: E.g., if the text field was disabled in the form, it will not be enabled by DISPLAY ... TO: