Text Entry Field
Windows control - Text entry field
Windows control - Text field is used to display and enter an information in text or numeric forms. It also allows to work with the information of logical type, but Windows control of Check box type is better for displaying a logical information.
Example
To create text entry field
In the Drawing toolbar click the button Text entry field .
Point the mouse cursor to the position of the first displayer corner and click.
Point the mouse cursor to the position of the diametric displayer corner and click.
Text entry field parameters are being configured in the palette Connect object through the following tabs:
Connect
Connected object
Selection of an object to connect. The object determines the contents of the text entry field and vice versa - the value of the object is being changed when the user enters a new value into the text entry field and clicks other graphic object in the picture. This feature does not apply in case of the parameter RichEdit. The type of displayed value is given by the type of the object.
When you connect an object of Structured variable, you must define whose item will be displayed in the displayer. Unique item position in structured variable is defined by the column name (the parameter Column) and the row number (the parameter Row). For object of Value array, you must define which array item will be displayed in the displayer.
Script
Reference variable
Specifies the name of the text entry field in the form of reference variable for use in the picture script.
Metadata
Assignment of application data (metadata) to a graphic object. If the object contains some metadata, the name of the first record will be displayed in the button. Multiple records are indicated by ",...".
Event
The list box allows user to select an active picture event for the text entry field. The list box contains the following active picture events:
Event Handler
The button opens the active picture script to define the active picture event specified by the parameter Event.
Info text/URL
Info text
Text to display as a tooltip when user points the mouse cursor to the text entry field in the picture opened in process D2000 HI.
Possibility to use the Dictionary (to open press CTRL+L).
URL
Definition of URL address to open a web page from a picture. The address may be set also in the picture script by the function %HI_SetOBJURL.
Properties
Text entry field may be conditioned that it must be filled in HI. If any text is not entered, the background of field matches with the color defined in application parameters. In D2000 GrEditor, the entry field is always colored according to this parameter.
Conditions for using background:
Optional item - no change of color (default),
Conditioned mandatory item – color set according to application parameters ColorConditionalItems
Mandatory item – color set according to application parameters ColorMandatoryItems
Text
The parameter is useless for this type of Windows control.
Visible
If the parameter is checked, the text entry field will be visible after first opening the picture in process D2000 HI. The parameter can be controlled from the script using the function %HI_SetVisible.
Disabled
If the parameter is checked, the text entry field will be disabled after first opening the picture in process D2000 HI. The parameter can be controlled from the picture script using the function %HI_SetEnable.
Group
The parameter allows you to set the text entry field as the first control of a group of Windows controls.
RichEdit
The parameter allows to open a windows control RichEdit instead of Text entry field. It enables to edit text and use more functions like more fonts and font colors. Text may be modified in the picture script by the functions.
The shortcuts are supported directly when you are writing some text: Ctrl+B - bold, Ctrl+U - underline, Ctrl+I - italic.
RichEdit enables 2 text types: formatted (it contains the format commands which control the way to display a text) and plain text without formatting.
For that reason, it is valid:
If some object is connected to EnryField, its value is visible, but a change, made by user, is not automatically set to this variable.
If some text without formatting is set into the variable, the formatting would disappear after leaving the Windows control - a new value of variable would substitute it.
If the text with formatting is set, the text would be unreadable by other means. It depends on an application to read the content when the focus loses or doing other activities.
Text length
Definition of the maximum number of characters, which can be entered into the text entry field.
Password
Displays an asterisk (*) for each character typed into the text entry field.
Right aligned
If the parameter is checked, text is right-aligned within the text entry field.