Defines a multi-line edit field.
The TEXTEDIT form item defines a text input field with multiple lines. This type of element is typically used to handle large text values such as comments or addresses that would not fit in a single-line edit field.
Use a VARCHAR(N) or STRING variable to hold the data for a TEXTEDIT form item.
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.
Some front-ends support different presentation and behavior options, which can be controlled by a STYLE attribute. For more details, see Common style attributes and TextEdit style attributes.
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, specify the WANTTABS and WANTNORETURNS attributes.
With 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.
With 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.
In a grid-based layout, the layout behavior of the TEXTEDIT widget can be controlled with the STRETCH and SCROLLBARS attributes.
In a stack-based layout, the TEXTEDIT widget always adapts to the field value to avoid scrollbars. You can control the minimum height of the TEXTEDIT widget by using the HEIGHT attribute. If the field content is null and the HEIGHT attribute is not defined, the minimum size defaults to one line.
By default, the input length in an TEXTEDIT fields is defined by the program variable. There is no need to define the SCROLL attribute, except if you explicitly specify SCROLLBARS=NONE (in a grid-based layout).
For more details about the SCROLL attribute, see Field input length.
Some front-ends can also support different text formattings, according to a style attribute. You can for example display and input HTML content in a TEXTEDIT with the Genero Desktop Client. When this feature is enabled, the TEXTEDIT support rich text editing. 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.