Progress
AppBuilder
Developer’s Guide
Configuring an Editor Instance
You can change some basic characteristics of the Editor widget’s appearance and behavior through its property sheet, if the default settings do not meet your needs. Note, however, that the more sophisticated behaviors, such as searching, cannot be enabled in the property sheet.
To configure your Editor object, begin by selecting the object and choosing Tools
Property Sheet. The dialog box opens:
![]()
Minimal Configuration
Although you might choose to accept the other default settings, you should make at least the first of these two changes:
- Change the default identifier to one that more closely reflects the role of this object in your application.
- Turn off the Horizontal scroll bar and turn on Word Wrap. The default style produces a single long line of input unless the user explicitly uses the RETURN key. This might not be the most appropriate style for the needs of your application.
Edit-buffer Size
The default size of an Editor widget’s buffer is 20KB under MS-Windows. You can reduce memory requirements by forcing a smaller buffer size. Enter the desired value in the Maximum Characters field.
Help
Add one or both of these help elements:
Geometry
AppBuilder allows you to adjust the position and size of your widgets interactively, by dragging their handles. The changes you make in this way are reflected in the Geometry values. You can also change these values explicitly, here.
AppBuilder normally generates source code that identifies the upper-left corner of the object as its origin. You can choose to have the upper-right corner identified as the origin instead. This alignment setting does not change the actual position of the object in any way.
Miscellaneous Properties (Other Settings)
You can change as many of these properties as you like:
- Auto-indent — Normally cleared. Setting this box causes a new line to inherit the indenting of the preceding line. This is now a universal feature in programmers’ editors, and is often a feature, in some form, in word-processing editors as well.
- Auto-resize — Normally cleared. Setting this box causes the Editor to automatically resize, if necessary, to keep the same amount of text in view despite changes in size or style of type.
- Display — Normally set. Clearing this box prevents the Editor from making its contents visible when it enables itself for input. The edit buffer will appear to the user to be empty.
- Drop Target — Normally cleared. Setting this box causes the Editor to experience an event whenever the user drops some other object onto it. You must write code to handle the event.
- Enable — Normally set. Clearing this box prevents this object from accepting the input focus.
- Hidden — Normally cleared. Setting this box prevents this object from displaying itself in response to implicit requests. If you set this box, you will need to include explicit code to make the object visible.
- Large — Normally cleared. Setting this box changes the size of the edit buffer from the 20KB default to some larger size consistent with system resources. Applies only to MS-Windows.
- No Box — Normally cleared. Setting this box prevents the Editor from displaying an outline and causes it to change its background color to be the same as that of the application. If you also turn off the scroll bars, the object will be nearly invisible. You can restore some visibility by forcing the background color to white. See the "Choosing Colors" section in "Frequently Used Dialogs."
- No Tab Stop — Normally cleared. Setting this box removes the Editor from its parent Frame’s traversal list. An object not in the traversal list can neither gain nor lose focus when the user presses the TAB key.
- No Undo — Normally set. Clearing this box causes the Editor to journal all changes made to its buffer.
- Read-only — Normally cleared. Setting this box prevents the Editor from allowing changes to its buffer contents, even though it will accept the input focus.
- Remove from Layout — Cleared. Cannot be set unless editing an alternate layout.
- Return Inserted — Normally cleared. When this box is cleared, if the Editor is a child of a Dialog Box that has a default button, a RETURN event chooses the default button. In all other cases, a RETURN event inserts a hard return at the cursor. Applies only to the MS-Windows platform.
- Scrollbar Horizontal/Vertical — Normally set. Clearing one or both of these boxes turns off the respective scroll bar(s). Turning off the horizontal scroll bar automatically sets the Word Wrap box.
- Shared — Normally cleared. Setting this box makes this widget and its edit buffer available to other procedures.
- Word Wrap — Normally cleared. Setting this box causes words to be wrapped to the next line if they would otherwise be clipped by the right edge of the Editor’s client area. This box is set by default when you turn off the horizontal scroll bar.
Advanced Properties
The Editor widget has only the standard Advanced Properties, but you can change those that do not meet your needs. See the "Advanced Properties" section in "Frequently Used Dialogs" for more information.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |