Progress
Programming
Handbook


Using an Editor

By default, editors support vertical scrolling with the up and down arrow keys, whether or not you specify scroll bars for the editor. Therefore, in the example, the user can type more than four lines of text within the editor. When the user moves beyond the last line shown, the first line scrolls up and out of the visible editing area; a new line scrolls into bottom of the visible area. If the user later moves the cursor up to the first line, the last line scrolls down and out of the visible editing area and the first line becomes visible again. To allow the user to scroll vertically using a scroll bar, specify the SCROLLBAR–VERTICAL option in the VIEW–AS phrase.

Word Wrap

By default, the editor also supports word-wrap. This means that when you reach the end of a line within the editor, text wraps to the next line rather than scrolling to the right. You can choose to enable horizontal scrolling instead by specifying the NO–WORD–WRAP option in the VIEW–AS phrase. You can also specify SCROLLBAR–HORIZONTAL along with NO–WORD–WRAP to add a horizontal scroll bar to the editor. 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.

Graphical Editors

Within an editor in a graphical environment, the user can select a range of text by holding down the SELECT mouse button and dragging the cursor. The user can delete the selected text by pressing DELETE. You can program further functionality for the editor by manipulating the editor’s attributes and methods.

Also, when a graphical editor is disabled (made insensitive to input), Progress grays out the contents and restores it when the editor is re-enabled.

Windows Editors

On Windows, editor widgets are limited to 20K of data, by default. To support more data, you must specify the LARGE option in the VIEW–AS phrase or set the LARGE attribute to TRUE. This raises the limit according to available system resources. If you try to enter more than 20K of data into a normal editor widget on Windows, or set MAX–CHARS greater than 20K, Progress displays a warning message.

NOTE: The LARGE option of the VIEW–AS phrase and the LARGE attribute apply only to graphical interfaces on Windows.

Character Editors

In a character interface, the user can move to the beginning or end of an editor by using the TOPCOLUMN or BOTTOMCOLUMN keys. The DELETEFIELD key deletes a word to the right of the cursor. The DELETECOLUMN keys deletes to the end of the current line. The INSERTCOLUMN key inserts a new line above the current line. The RETURN key creates a new line after the current line. The user can toggle between inserting and overtyping text using the INSERTMODE key.

NOTE: In character interfaces, the editor does not support the tab character. When Progress reads a file that contains tabs into a character editor widget, it replaces the tabs with eight space characters. When it writes out the file, the tabs are not restored, and the file is permanently changed.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095