Progress
AppBuilder
Developer’s Guide
Configuring SmartDataViewer Properties
SmartDataViewers have properties associated both with their Fill–in components and with their nature as a procedure-based object. You can make a number of changes to those settings, if the default values do not meet your needs.
To open the property sheet associated with a Fill–in component, follow these steps:
Minimal Configuration
Although you can accept many of the default settings, you might wish to make three changes:
- Add a Tooltip string. Under MS-Windows, Tooltips display whenever the user allows the mouse cursor to hover for a few seconds over an object for which a Tooltip is defined.
- Add a unique integer as the identifier for context-sensitive help, if you plan to provide such help as part of your application.
- Set the Read-Only check box (in the Other Settings area) to prevent the user from modifying the data in the field.
Rearranging the Layout
The way a Viewer’s fields are laid out is also a property that can be changed, though only at the level of the master. All instances created from a given master share the same physical layout. To have different layouts for different applications, you must either create extra copies of the master and lay out each one differently—effectively creating separate masters—or use the alternate-layouts feature. See "Multiple Layouts" for information about that feature.
To create a custom layout, follow these steps:
- Open the master object by choosing File
Open. The object opens in a design window workspace:
![]()
- Save the master under the name you will use for the new arrangement. Do this before you actually make any changes, so that you will not risk getting confused later and overwriting the original arrangement.
- Resize the workspace appropriately, drag the individual Fill–ins into the new arrangement, and save again:
![]()
Note that you should make the workspace no larger than needed, since the amount of space taken up by an instance is always the same as the master’s workspace.
Other Property Changes
By default, AppBuilder predefines certain properties of each Fill–in that is used by a SmartDataViewer, and makes some of the properties read-only:
AppBuilder creates and assigns a unique identifier, and sets the other properties to conform to the field definition from the data stream. You cannot assign a different identifier or change the basic data type, but should you wish to make changes to the label, field specifications, or help string, you can do so by following these steps:
- Click the Database Field button, and when the dialog box opens, clear the check boxes for the properties you wish to set by hand. Choose OK to dismiss the dialog box. If you clear all three, the properties dialog box appears as shown here:
![]()
- You can now enter new values for the label and the format specification. If you wish to pick the format specifier from a list, choose the Format button to open that dialog box:
![]()
You can more directly change other properties:
CAUTION: Making this Fill–in Movable or Resizable (Advanced Properties) prevents this Fill–in from gaining input focus using the mouse. So if you also set this property, you effectively prevent the widget from ever gaining input focus.
- No Label — Normally cleared. Setting this check box turns off display of any label. Setting this check box does not clear the actual label text; the label string remains visible in the property sheet. The only other effect of setting or clearing this box is to alter the values in the Geometry section so that the Fill–in stays at the same XY location within the enclosing Frame.
- Geometry — Reflects the XY origin and size, in character units, of the Fill–in. By default, the Fill–in is colon-aligned. You can change that to left- or right-alignment, though the only noticeable effect that will have is to change the X origin value.
- Auto-Resize — Normally cleared. Setting this box causes the object to automatically change its displayed size to agree with the current type size.
- Auto-Return — Normally cleared. Setting this box causes focus to move to the next object in the traversal list once this Fill–in has accepted as many characters as it can.
- Blank — Normally cleared. Setting this box prevents the Fill–in from echoing input back to the display. Useful for password fields and similar applications.
- Deblank — Normally cleared. Setting this box causes the Fill–in to automatically discard any leading blanks from input.
- Disable Auto-Zap — Normally cleared. Setting this box prevents the Fill–in from automatically clearing its input field whenever it gets the focus.
- Display — Normally set. Clearing this box prevents the SmartDataViewer from automatically populating this Fill–in during initialization.
- Drop Target — Normally cleared. Setting this box causes this object to experience an event whenever the user drags another object onto this one. You must write the appropriate event-handling code.
- Enable — Normally set. Clearing this box makes the Fill–in decline input focus when offered.
- Hidden — Normally cleared. Setting this box prevents the Fill–in from responding to implicit requests to display itself. It will only honor explicit requests.
- Native — Normally cleared. Setting this box causes the Fill–in to vary its behavior according to the underlying platform (MS-Windows, for example) rather than behaving in the same way regardless of platform.
- No Tab Stop — Normally cleared. Setting this box removes this Fill–in from the enclosing Frame’s traversal list. Normally, pressing the key causes focus to move to the next object in the list. When this box is set, the Fill–in can neither lose nor gain focus when the user presses the TAB key. If the widget has the focus, it will ignore the key, and if it does not, focus will cycle through the other members of the traversal list while ignoring this widget.
- No Undo — Cleared. Cannot be set. Progress will always journal changes to the data in this Fill–in.
- Read-Only — Normally cleared. Setting this box prevents the user from changing the content of the Fill–in.
- Remove from Layout — Cleared. Cannot be set unless defining an alternate layout.
- Shared — Cleared. Cannot be set. This Fill–in will always be local to the SmartDataViewer within which it is defined.
- View as Text — Normally cleared. Setting this box causes this Fill–in to display the contents of its field as though it were static text: read-only, and without any border or 3D effect.
Advanced Properties
A Fill–in has only the minimum Advanced Properties, but you can change those that do not meet your needs.
CAUTION: If you make this Fill–in Movable or Resizable, and you also set the No Tab Stop option in the base property sheet, you effectively prevent this object from ever gaining input focus.
- Initial Value — You cannot set this for a Fill–in that is part of a SmartDataViewer.
- Help — Unless this Fill–in inherits the help string defined in the data dictionary, the text you enter here will display in the parent Window’s status bar whenever this Fill–in has input focus. No text will display if the Window has no status bar.
- Private Data — AppBuilder assigns the contents of this field as the value of the PRIVATE–DATA property. You can write code to manipulate this data in any way you desire.
- Layout Units — You can choose character or pixels. This setting affects source code generation only.
- Custom Lists — You can add this Fill–in to any or all of the six lists (macros) maintained by the enclosing Frame.
- Geometry — Shows the same information as in the base property sheet, but in pixel units.
- Manual Highlight — Normally cleared. Setting this box allows you to write code to define a custom highlight effect. Your custom effect will be applied whenever this Fill–in has input focus.
- Movable — Normally cleared. Setting this box makes it impossible for the user to give this Fill–in input focus by clicking with the mouse. Instead, the user can use the mouse to drag the Fill–in field—but not the label, which remains where it was—to a different position within the bounds of the enclosing Frame.
- Resizable — Normally cleared. Setting this box makes it impossible for the user to give this Fill–in input focus by clicking with the mouse. Instead, if the Selectable box is also set, clicking with the mouse causes handles to appear so that the user can resize the object.
- Selectable — Normally cleared. Setting this box allows the user to select this object.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |