EditText control

An EditText control is an editable text field. Each EditText control is linked to an symbolic variable and text entered in the control is automatically copied to the variable's value. The variable itself can be used elsewhere; this allows you to use the EditText control to control the installer's actions or obtain information such as a registration code at installation time.

Tip: To change the tab and Z-order of a control in a dialog box (i.e., the order in which they are drawn and how they appear "on top" of each other), select the control in the dialog/control tree in the left pane on the Dialogs project page, then use Ctrl+Up and Ctrl+Down to move the control up or down in the order. These keystrokes are shortcuts for the Move Up and Move Down commands on the control's context menu.

Attributes

The following attributes and options are available.

Attribute Description
Control name Enter the internal name for the control. This name is for use in InstallMate only; it is not used in the installer. All control names must be unique within their parent dialog box.
Control ID

Select a control ID from the drop-down list or type a numerical ID to use for this control. All controls within a dialog must have different control IDs. For EditText controls, you should select Automatic.

See Dialog control IDs for an explanation of the available control IDs and their usage.

Input filter

Select the desired input filter from the drop-down list. The following choices are available:

  • None - Don't filter text input
  • Uppercase - Convert all letters to upper case; accept all other characters as-is.
  • Lowercase - Convert all letters to lower case; accept all other characters as-is.
  • Numeric - Accept only digits.

Note: The Filter option only applies to text entered by the user; text loaded from the linked symbol (below) is not filtered.

Read-only Check this box to make the EditText control read-only; clear it to make it read-write. Read-only controls display the text from the linked variable, but do not allow the user to change the displayed text.
Password Check this box to display any text in the control as asterisks; clear it to make the text visible. This option is useful to prevent onlookers from reading sensitive information such as passwords.
Not empty

Check this box to require some text in the EditText control when the parent dialog box is closed; clear it to allow empty text entry. If this option is checked and no text is present in the control, the control prevents closure of the dialog box and displays an error message to the user.

Note: This check is only made when the parent dialog box is closed by IDOK, IDNEXT, and other standard control IDs that continue the parent's action sequence; the check is not made if the dialog box is closed by control IDs that terminate the parent's action sequence (IDCANCEL, IDABORT, and others) or that cause the previous action to be executed (IDBACK, IDRETRY, and others).

Multiline Check this box to create a multiline edit control; clear it for a single-line control. If this box is checked, the user can enter multiple lines of text (you must increase the control's height for more than one line to be visible) and can also insert line breaks by pressing Ctrl+Enter (or just Enter if you also check Want return).
Want return Check this box for the control to respond to Enter key presses; clear it to pass Enter on to the parent dialog box. In the latter case, Enter key presses will usually end up with the default PushButton control, which might close the dialog box. We therefore recommend that you check Want return if you create a Multiline EditText control.
Horizontal scrollbar Check this box to display a horizontal scrollbar in the control; clear it to hide the scrollbar. This only applies to Multiline controls; if you use this option, you should increase the height of the control to allow room for the scrollbar.
Vertical scrollbar Check this box to display a vertical scrollbar in the control; clear it to hide the scrollbar. This only applies to Multiline controls; if you use this option, you might need to increase the width of the control to allow room for the scrollbar.
Automatic horizontal scroll Check this box to scroll the text in the control automatically when the user enters text beyond the width of the edit control; clear it to prevent text entry beyond the width of the control. (If the Horiz scroll option is set for Multiline controls, the user can still scroll the text manually.)
Automatic vertical scroll Check this box to scroll the text in the control vertically when the user enters a new line beyond the height of the edit control; clear it to prevent text entry beyond the height of the control. (If the Vert scroll option is set for Multiline controls, the user can still scroll the text manually.)
Font Select the font style for the text in the control by clicking ... (browse) to open the Select Font Style dialog. If no font style is selected, the control uses the parent dialog's font style. You can remove the font style by clicking X (clear).
Horizontal align Select the desired text alignment from the drop-down list.
Symbol name

Enter the name of the symbolic variable to which the control must be linked, or click ... (browse) to open the Select Symbolic Variable dialog box that allows you to select a variable from the project.

The control's caption will display the value of the linked variable and will be updated automatically whenever the variable's value changes. Conversely, the variable's value will be updated if the user enters text in the EditText control.

Indirect symbol

Check this box to make the Symbol name link indirect; clear it for a direct link. If the link is indirect, the variable specified in the Symbol name field is used to obtain the name of a second variable, and it is this second variable whose value is monitored and updated by the control. With a direct link, the variable specified by the Symbol name attribute itself is monitored and updated.

Enabled
Tab stop
Group
Border
Sunken
Client edge
Visible
Transparent
Don't mirror

These are all standard control styles; see Dialog control styles for a description.

Condition Enter the display condition for the control or leave empty to display the control unconditionally. See Dialog control conditions for more information.

Related topics

Dialogs, Working with attribute panes