Command Reference : Function Reference : Function Reference: U
  
 
@uiedit
 
Displays a dialog with an edit field.
Syntax: @uiedit(arg, prompt[, maxlen])
input: string object, replacement variable
prompt: string
maxlen: (optional) integer
Return: integer
Displays a dialog with an edit field and prompt string that will be used to label the edit field.
arg is generally entered as a replacement variable or an object in your workfile as it is used to return results. arg is used to initialize the edit field and will contain the value after editing.
prompt may be specified using in-line text.
maxlen is an optional maximum character length of the edit field. The default maximum length is 32 characters.
The dialog shows an OK and Cancel button, and will return an integer representing the button clicked: Cancel (-1), OK (0).
Examples
string name = "Joseph"
@uiedit(name, "Please enter your First Name:")
These commands display a dialog with the text “Please enter your First Name:” followed by an edit field, initialized with the string “Joseph”. If the user edits the string to read “Joe” and presses the OK button, the dialog returns a value of 0 and NAME will now contain the string: Joe.
Similarly,
@uiedit("", "Please enter your age:", 2)
brings up a dialog with the prompt “Please enter your age” and an empty edit field with a maximum length of two characters. The user will not be able to enter more than two characters into the edit field.
Cross-references
See “User-Defined Dialogs” for discussion.
See also @uidialog, @uilist, @uiprompt, @uiradio.