Form file structure / ATTRIBUTES section |
The TEXTEDIT item type defines a multi-line edit field.
Figure 1. TEXTEDIT item type
TEXTEDIT item-tag = field-name [ , attribute-list ] ;
COLOR, COLOR WHERE, COMMENT, DEFAULT, DOWNSHIFT, FONTPITCH, HIDDEN, INCLUDE, JUSTIFY, KEY, NOT NULL, NOENTRY, PROGRAM, REQUIRED, SAMPLE, SCROLLBARS, SIZEPOLICY, STYLE, STRETCH, TAG, TABINDEX, UPSHIFT, VALIDATE LIKE, WANTTABS, WANTNORETURNS.
Table column only: UNSORTABLE, UNSIZABLE, UNHIDABLE, UNMOVABLE, TITLE.
The TEXTEDIT form item type allows the user to enter a long text on multiple lines.
By default, when the focus is in a TEXTEDIT field, the Tab key moves to the next field, while the Return key adds a newline (ASCII 10) character in the text. To control the user input when the Tab and Return keys are pressed, you can specify the WANTTABS and WANTNORETURNS attributes. When you specify WANTTABS, the Tab key is consumed by the TEXTEDIT field, and a Tab character (ASCII 9) is added to the text. The user can still jump out of the field with the Shift-Tab combination. When you specify WANTNORETURNS, the Return key is not consumed by the TEXTEDIT field, and the action corresponding to the Return key is triggered. The user can still enter a newline character with Shift-Return or Ctrl-Return.
You can use the SCROLLBARS attribute to define vertical and/or horizontal scrollbars for the TEXTEDIT form field. By default, this attribute is set to VERTICAL for TEXTEDIT fields. The STRETCH attribute can be used to force the TEXTEDIT field to stretch when the parent container is re-sized. Values can be NONE, X, Y or BOTH. By default, this attribute is set to NONE for TEXTEDIT fields. Note that using either the SCROLLBARS or the STRETCH attribute will automatically set the SCROLL attribute, to bypass the size limit defined by the screen tag and use the size of the program variable instead. For more details about size limitation, see the SCROLL attribute definition.
Some front-ends support different text formats which can be controlled by a style attribute. You can for example display and input HTML content in a TEXTEDIT.
A TEXTEDIT can also be used to edit rich text format. Depending on the front-end, different formatting options are available (bold, font size, and so on) and can be controlled using either an integrated toolbox or via local actions. In this case, the value of the field will be an HTML representation of the text and its decoration.
Please note that:
TEXTEDIT f001 = customer.address, WANTTABS, SCROLLBARS=BOTH;