Was this helpful?
Multiline Entry Fields
Like a single-line entry field, a multiline entry field displays data. However, at the end of each line of a multiline entry field, OpenROAD automatically wraps the text to fill in the field.
You can use a multiline entry field to display information for the end user, or to provide a data entry area where the end user can enter or modify information. To allow the end user to enter or read text that is longer than the field, you can include a vertical scroll bar. A multiline entry field may also have a horizontal scroll bar.
For information about using entry fields in portable forms, see the Programming Guide.
Create a Multiline Entry Field
You can create a multiline entry field on a form.
To create a multiline entry field
1. Open your frame in the Frame Editor (see Open an Existing Frame).
2. Select the Entry Field - Multiline icon on the field palette.
3. Position the cursor on the form, click, and then drag the cursor to size the multiline entry field.
Note:  Simulate Mode provides an easy way to test the size of a field. You can create a field, switch to Simulate Mode, and enter text of the length that you expect users to enter. The text remains in the field when you switch back to development mode. To enter Simulate mode, click Tools, Simulate on the floating menu bar.
4. Set the properties for the multiline entry field.
Note:  The IsMultiLine property defaults to TRUE, whereas for single-line entry fields, this property defaults to FALSE.
For complete descriptions of each field property, see Multiline Entry Field Properties, and Common Field Properties.
Multiline Entry Field Properties
All the properties for multiline entry fields are described under Common Field Properties, with the exception of the following properties or values that are specific to the multiline entry field type:
CharsPerLine
Indicates the number of average-sized characters that a box trim, free trim, or entry field can display, thereby controlling the size of the field.
Note:  This number may differ from that specified for the MaxCharacters property. For example, suppose an entry field's data type is set to varchar(32), CharsPerLine is set to 10, and MaxCharacters to 32. The end user will be able to enter up to 32 characters, but the data in the entry field will scroll. When the entry field contains more characters than are visible, the end user can use the right and left arrow keys, and Home and End, to scroll through the entry field. The user can also insert and delete characters, using the Insert key to switch between overtype and insert mode.
ForceCase
For varchar data, specifies that input always be displayed in uppercase or lowercase, no matter how the end user enters it. Valid options are:
FC_UPPER
FC_LOWER
FC_NONE (no case shift)
Default: FC_NONE
FormatString
Specifies either a data format template or a format string for an entry field used as a table field cell. Valid formats vary, depending on the field's data type. If this property is not set, OpenROAD uses the data type's default format.
Note:  For more information about using various types of data format templates, see Data Format Templates.
HasHorizontalScrollBar
Specifies whether a horizontal scroll bar is provided for the end user to move left and right through the text. Possible values are:
TRUE
Specifies a horizontal scroll bar
FALSE
Specifies no horizontal scroll bar
Default: FALSE
Note:  This option is available for multiline format only.
HasScrollBar
Specifies whether a vertical scroll bar is provided for the user to move up and down through the text. Possible values are:
TRUE
Specifies a vertical scroll bar
FALSE
Specifies no vertical scroll bar
Note:  Default: TRUE
Note:  This option is available for multiline format only.
IsMandatory
Specifies whether the end user is required to enter a value in the entry field before leaving it. If the end user never enters this field, this property can be used in conjunction with the CheckFailedMandatory method of the ActiveField class to check for a value.
Possible values are:
TRUE
Specifies that the end user must enter a value in the field before exiting it
FALSE
Specifies that the end user need not enter a value in the field before exiting it
IsMultiLine
Specifies whether an entry field is single- or multiline. Valid value are:
TRUE
Specifies that multiple lines of text can be entered in the entry field
FALSE
Specifies that the Lines property cannot be set to anything but 1. (FALSE is the default setting for single-line entry fields; TRUE is the default setting for multiline entry fields.)
Default: TRUE
IsPassword
Specifies whether text is displayed as the end user enters or edits text in the entry field. Possible values are:
TRUE
Specifies that text is not displayed
FALSE
Specifies that text is displayed
Default: FALSE
Lines
Specifies the number of lines displayed in a multiline entry field
MaxCharacters
Specifies the value of MaxCharacters, which by default depends on the data type and the FormatString, and can be limited to a lesser value:
If the data type is Integer, MaxCharacters is 13 because the maximum number of characters for an integer is 13.
If the data type is Varchar(n), MaxCharacters is also n.
Note:  By setting the CharsPerLine property to the value of the MaxCharacters property, you can get an approximate match between the allowable number of characters in the field and the width of the field.
StringValue
Displays the text of the field, exactly as it appears. For multiline entry fields, this property does not include any extra spaces added for word wrap, although it does include hard tabs and newline characters.
TextValue
Displays the first 256 characters of text in the field, exactly as they appear. If this field is an entry field, then this property holds the first 256 characters of data. For multiline entry fields, this property does not include any extra spaces added for word wrap, although it does include hard tabs and newline characters.
If this field is a box trim or free trim field, this property holds the first 256 characters.
UseWidestCharacter
Specifies whether a maximum character width must be used to calculate the field width. This property applies only to entry fields, box trim, and free trim. It is used in conjunction with the CharsPerLine property. Possible values are:
TRUE
Specifies that a maximum character width is used to calculate the field width
FALSE
Specifies that a maximum character width is not used to calculate the field width
WidestCharacterWidth
Specifies the width (in pixels) to use for characters if UseWidestCharacter is set to UWC_USER
Last modified date: 06/25/2024