EDITOR phrase
Specifies that a field or variable is displayed as a text editor widget. This is especially useful for long text (CHARACTER and LONGCHAR) fields. The EDITOR phrase is an option of the VIEW-AS phrase.
Syntax
size-phrase
Specifies the outer width and height of the text editor widget in characters or pixels. This is the syntax for size-phrase:
For more information, see the SIZE phrase reference entry.INNER-CHARSchars
INNER-LINESlines
Specifies the number of characters visible in each line of the Editor and the number of lines visible within the Editor. Bothchars
andlines
must be integer constants.Note that the values you supply for INNER-CHARS and INNER-LINES specify only the size of the editing area, not the overall size of the editor widget. The overall size is determined by the size of the editing area plus the sizes of the margin and border heights and widths.BUFFER-CHARSchars
In character mode, specifies the number of characters a user can enter on each line. When the last character is typed, the text input cursor automatically wraps to the next line. This option is ignored in graphical environments.Thechars
value must be an integer constant that is equal to or greater than the value specified by SIZEwidth
or INNER-CHARSchars
. If greater, horizontal scrolling is enabled. The default is the value specified by SIZEwidth
or INNER-CHARSchars
.BUFFER-LINESlines
In character mode, specifies the number of lines a user can enter. By default, ABL does not limit the number of lines (although system limits might apply). This option is ignored in graphical environments.Thelines
value must be an integer constant that is equal to or greater than the value specified by BYheight
or INNER-LINESlines
. If equal, vertical scrolling is disabled.LARGE
Specifies that ABL use a large editor widget rather than a normal editor widget in Windows. A normal Windows editor can contain up to 20K of data. The LARGE option allows the editor to contain data up to the limit of your system resources. However, it also consumes more internal resources and lacks some functionality. Use the LARGE option only if you have to edit very large sections of text. The LARGE option applies only to Windows; other interfaces allow for larger editors by default. This option is ignored in those other interfaces.MAX-CHARScharacters
NO-BOXNO-WORD-WRAPSCROLLBAR-HORIZONTALSCROLLBAR-VERTICALTOOLTIPtooltip
Allows you to define a help text message for a text field or text variable. The AVM automatically displays this text when the user pauses the mouse button over a text field or text variable for which a tooltip is defined.You can add or change the TOOLTIP option at any time. If TOOLTIP is set to "" or the Unknown value (?
), then the tooltip is removed. No tooltip is the default. The TOOLTIP option is supported in Windows only.ExampleThe following example uses two editor widgets. The
Item.CatDescription
field is viewed as an EDITOR in the item-info frame and the variablemy_clipbd
is viewed as an EDITOR in the clip frame. Use the EDITOR functions provided by your interface environment to copy text fromCatDescription
into my_clipbd. You can then subsequently copy that text into theCatDescription
field of another item.
Notes
- If you specify the SCROLLBAR-VERTICAL option in, a vertical scroll bar appears on the side of the Editor. The user can then use the scroll bar to scroll within the widget. Whether or not you specify SCROLLBAR-VERTICAL, the user can scroll vertically by using the up and down arrow keys to move above or below the displayed text.
- If you use the SIZE phrase to specify the dimensions of the Editor, the AVM uses a portion of this overall space (thereby shrinking the size of the editing area) for any scroll bars you specify. Use the INNER-CHARS and INNER-LINES options if you want a fixed size for the editing area, regardless of the presence of scroll bars.
- In Windows, the editor widget supports lines of up to 255 characters only.
- By default, the editor widget supports text wrap. This means that when you reach the end of a line within the widget, text wraps to the next line rather than scrolling to the right. In graphical interfaces, you can enable horizontal scrolling by specifying either the NO-WORD-WRAP or SCROLLBAR-HORIZONTAL options. If you specify SCROLLBAR-HORIZONTAL, a horizontal scroll bar appears. If you specify NO-WORD-WRAP, but not SCROLLBAR-HORIZONTAL, the user can scroll horizontally by using the left and right arrow keys at the edge of the displayed text.
- Windows allows a user to transfer focus to the editor by pressing ALT and one of the letters in the label. This is called a mnemonic.
- The character-mode editor does not support the tab character. When the AVM reads a file that contains tabs into an editor widget, it replaces the tabs with eight spaces. When it writes the file, the tabs are not restored and the file is permanently changed.
- When you specify the LARGE option, the following attributes and methods no longer apply to the editor:
- For SpeedScript, the only valid options are:
size-phrase
, INNER-CHARS, INNER-LINES, MAX-CHARS, NO-BOX, NO-WORD-WRAP.See also
OpenEdge Release 10.2B
|