Purpose
Part of a Dialog statement; adds an EditText control box (input text) to a dialog box.
Syntax
Control EditText
[ Position x, y ] [ Width w ] [ Height h ]
[ ID control_ID ]
[ Value initial_value ]
[ Into variable ]
[ Disable ] [ Hide ] [ Password ]
x, y specifies the control's position in dialog box units.
w specifies the width of the control in dialog box units.
h specifies the height of the control in dialog box units; if the height is greater than 20, the control becomes a multiple-line control, and text wraps down onto successive lines.
control_ID is an integer; cannot be the same as the ID of another control in the dialog box.
initial_value is a string or a numeric expression that initially appears in the dialog box.
variable is the name of a string variable or a numeric variable; MapInfo Pro stores the final value of the field in the variable if the user clicks OK.
The Disable keyword makes the control disabled (grayed out) initially.
The Hide keyword makes the control hidden initially.
The Password keyword creates a password field, which displays asterisks as the user types.
Description
If the user types more text than can fit in the box at one time, MapInfo Pro automatically scrolls the text to make room. An EditText control can hold up to 32,767 characters.
If the height is large enough to fit two or more lines of text (for example, if the height is larger than 20), MapInfo Pro automatically wraps text down to successive lines as the user types. If the user enters a line-feed into the EditText box (for example, on Windows, if the user presses Ctrl+Enter while in the EditText box), the string associated with the EditText control will contain a Chr$(10) value at the location of each line-feed. If the initial_value expression contains embedded Chr$(10) values, the text appears formatted when the dialog box appears.
To make an EditText control the active control, use an Alter Control...Active statement.
Example
Control EditText
Value "Franchise Locations"
Position 65, 8 Width 90
ID 1
Into s_map_title
See Also:
Alter Control statement, Dialog statement, ReadControlValue() function