Input Field Control

#### Search Results

Search

# Input Field Control

This document covers the following topics:

- Description

- Attributes for Input Field Control

- Events

## Description

An input field control is used to enter data in a single line. It corresponds to a field in a Natural program's INPUT statement. You can map database fields or other program variables to an input field control by means of a linked variable. The input is automatically copied to a linked variable if you select the "Linked Variable" option in the attribute window's "Source" dialog box and you enter the name of the linked variable, for example, the database field. When the end user has finished entering data and the input field control loses the focus, the data entered are validated.

You can also validate the input data by assigning an EDIT-MASK attribute to a (linked variable) input field control: the check is performed when the input field control loses the focus.

When the linked variables have been modified by code and you want to display the new values, you use the PROCESS GUI statement action REFRESH-LINKS.

Whenever input is rejected, for example, because the linked variable has another Natural data type, or because the EDIT-MASK was not matched, a message box is displayed that prompts the end user to "Retry" or "Cancel". The end user must press "Retry" to keep the current content of the input field control and to modify it. The end user must press "Cancel" to reset the input field control to the last valid content.

Note
Notes: When you create an input field control, and you assign it a STYLE value of "Center" ('c') or "Right" ('r'), the input field control's height must be greater than the height of the system font. Otherwise, the STRING will not be displayed. Input in an input field control is limited to 253 characters.

## Attributes for Input Field Control

Attribute Name | Query | Set/Modify | In Attr. Window
--- | --- | --- | ---
BACKGROUND-COLOUR-NAME | X | X/X | X
BACKGROUND-COLOUR-VALUE | X | X/X | X
CLIENT-DATA | X | X/X |
CLIENT-HANDLE | X | X/X |
CLIENT-KEY | X | X/X |
CLIENT-VALUE | X | X/X |
CONTEXT-MENU | X | X/X | X
DIL-TEXT | X | X/X | X
EDIT-MASK | X | X/X | X
ENABLED | X | X/X | X
FIRST-CHILD | X | -/- |
FOLLOWS | X | X/X |
FONT-HANDLE | X | X/X | X
FOREGROUND-COLOUR-NAME | X | X/X | X
FOREGROUND-COLOUR-VALUE | X | X/X | X
HELP-ID | X | X/X | X
LAST-CHILD | X | -/- |
LENGTH | X | X/X | X
LINKED | X | X/- | X
MODIFIABLE | X | X/X | X
MODIFIED | X | -/X |
MODIFIED-SUCCESSOR | X | -/- |
OWNER | X | X/- |
PARENT | X | X/- |
PREDECESSOR | X | -/- |
RECTANGLE-H | X | X/X | X
RECTANGLE-W | X | X/X | X
RECTANGLE-X | X | X/X | X
RECTANGLE-Y | X | X/X | X
RTL | X | -/- | X
STRING | X | X/X | X
STYLE | X | X/- | X
SUCCESSOR | X | -/- |
SUPPRESS-CHANGE-EVENT | X | -/- |
SUPPRESS-ENTER-EVENT | X | X/X |
SUPPRESS-LEAVE-EVENT | X | X/X |
TOOLTIP | X | X/X |
TYPE | X | X/- |
VARIABLE | - | X/X | X
VISIBLE | X | X/X | X

## Events

Change Event, Enter Event, Leave Event (all events may be suppressed).

Note
The change event occurs for an input field control if either the end user or the code changes the content. It does not occur on the initial setting of the input field control. It is not recommended to manipulate the system focus from within the change event handler. Furthermore, the content of a linked variable is not updated in a change event.

### On this page

- Description
- Attributes for Input Field Control
- Events