autonext specifies whether input must move to the next field after the value specified for maxLength is reached.
in Lycia Form Designer |
Form XML code:
<element_name autonext="true">
By default, the property is set to false and is absent from the form XML code. The property value will appear in the form XML code only once the property value is set to true.
Possible values: true, false
Default value: false
Associated containers, widgets and theme elements:
Associated 4gl syntax:
Associated ui methods:
SetAutonext ↓
GetAutonext ↓
Influence and behavior:
If autonext is set to true, input will move to the next field after the value specified for maxLength is reached:
lycia form designer |
For the first textArea (identifier=f1), autonext=true:
|
For the first textArea (identifier=f1), autonext=false:
|
4gl code |
MAIN DEFINE f1, f2 STRING
OPEN WINDOW w WITH FORM "autonext" ATTRIBUTE(BORDER)
MENU COMMAND "input" INPUT BY NAME f1 WITHOUT DEFAULTS INPUT BY NAME f2 WITHOUT DEFAULTS COMMAND "exit" EXIT MENU END MENU
END MAIN
|
|
runtime appearance before the maxLength value is reached |
||
runtime appearance after the maxLength value is reached |
The property is particularly useful with fields intended for the data strings of a certain standard length (like birth and application dates, numeric postal codes, tax reference numbers, etc.). autonext can also be used for the fields 1 byte long in order to increase the interface user-friendliness (in this case one and the same keystroke will enter data and move input to the next field).
At runtime, you can use ui methods to find out whether autonext is set to true or false and specify the necessary application behavior:
LET widget_var = ui.<widget>.ForName("widget_id1")
CALL widget_var.setAutonext(...)
4gl code sample |
DEFINE ta ui.TextArea ... LET ta = ui.TextArea.ForName("f1") CALL ta.setAutonext(1)
|
DEFINE ta ui.TextArea ... LET ta = ui.TextArea.ForName("f1") CALL ta.setAutonext(0)
|
runtime appearance before the maxLength value is reached |
||
runtime appearance after the maxLength value is reached |
LET widget_var = ui.<widget>.ForName("widget_id1")
DISPLAY widget_var.getAutonext()
4gl code sample |
DEFINE ta ui.TextArea ... LET ta = ui.TextArea.ForName("f1") CALL ta.setAutonext(1) DISPLAY "autonext is set to ", ta.setAutonext(O), "." INPUT BY NAME f1 WITHOUT DEFAULTS
|
runtime appearance |
Example programs:
CVS server: client.querix.com
CVS repository: /lycia_doc_examples
User: client
Project: form_properties
Program: autonext
Related articles: