Programmer Guide/Shell Items/Dialog/Dialog Controls/Edit
SET dialog index EDIT row col caption var1 [ width height var2|* fg bg font ] [ /A|L|R ] [ /F[=PCAFS] ]
var1 | The name of the variable or table (for multiline edit; /Multiline ) to store the edit string in.
|
var2 | This is an optional table setting advanced properties of the edit control (see below). If you don't need to set advanced properties, you may indicate so by supplying the asterisk, "* ", instead of a table.
|
Advanced properties of the EDIT control
A large number of advanced properties (i.e., settings) for an edit control may be set using a parameter table supplied as the var2 argument (see above). If you don't need these advanced features, you may indicate so by supplying an asterisk, "*
", instead of a table.
The parameter table used for setting the advanced properties of an edit control must be an extended table containing exactly two string columns that, in turn, must be named "parameter" and "string". You may create such a table using the following STx statement:
#tab := new table * * /E string:parameter string:string
For each advanced property to set, you need to store a respective entry (i.e., row) in the table, and tag the entry (see Tagging table entries). Each such entry has to contain the name of the respective property in the name
column, and its desired value in the string
column.
The following advanced parameters are supported:
Parameter | Value(s) |
---|---|
name field | string field |
append
|
on or off
|
breakpoints
|
on or off
|
caret
|
on or off
|
clear
|
If specified, clears the contents of the edit control. There is no argument to this parameter.
Example: |
colorOutput
|
sets the color for the shell output (only for edit controls with a type property set to cli )
|
colorInput
|
sets the color for the input (only for edit controls with a type property set to cli )
|
colorPrompt
|
sets the color for the prompt (only for edit controls with a type property set to cli )
|
colorBackground
|
Sets the color for the background (only for edit controls with a type property set to cli )
|
colorCaret
|
Sets the color (only for edit controls with a type property set to cli )
Example: |
currentLine
|
lineNumber
|
lineNumbers
|
on or off
|
outputMode
|
The following values are supported:
Example: |
outputLineLimit
|
If set to a number higher than zero, the control will limit the number of lines displayed. This is particularly useful when using a "log " type edit box.
|
prompt
|
the CLI prompt, e.g. "> " or "# "
|
readonly
|
on or off
|
showLine
|
lineNumber
|
type
|
The following values are supported:
|
waitforinput
|
If set to "on ", key messages will be passed on to the shell without the CLI processing them in any other way. This can, e.g., be used by the console getc command to wait for the user to input a character. When the key processing should continue, this parameter should be set to "off ".
|
Note again that parameters you supply in the control table are ignored unless tagged.
Important: Once a setting has been applied, the tag will be removed. So, if you want to change the setting at a later time, you need to tag it again.
Additional options for the EDIT control
Option | Meaning |
---|---|
/Integer or /Number
|
Input field must contain a valid floating-point number (/Number ) or an integer (/Integer ), or a numeric expression of the respective type; expressions are evaluated before assigned to var1 (not applicable/available if var1 is a table).
|
/Password
|
Input is hidden; an asterisk, "* " is displayed for each entered character
|
/Multiline
|
Allow multiline input. |
/Keystroke
|
Send UPDATE message to shell for each entered character; otherwise the update message is only sent if the input is completed (another control is selected).The enter key is a special case; for /Multiline edit boxes, the enter key is used for line breaks, whilst for single line edit boxes, the enter key sends a COMMAND message (since STx version 3.6.0). Note that the enter key for a single line edit box also sends the same command as the default button (if one is defined - see BUTTON ).
|
/F[=PCAFS]
|
If no modifier is specified, all keys are forwarded. Otherwise, the listed modifiers will come into effect. Any combination of the modifiers is allowed. The modifiers have the following meaning:
|
See Common arguments for a description of the parameters not described here.