Progress
Language Tutorial
for Windows
Working with Fill-in Fields
The fill-in field is a labeled display and input area for a database field or variable. The fill-in field displays and accepts input as text strings. Figure 7–2 shows the parts of a fill-in field.
Figure 7–2: Parts of a Fill-in Field
![]()
The fill-in field is the all-purpose data representation. Think of the fill-in field as the data widget you use unless another data widget is better. Since the fill-in field is the default data widget, you don’t need to write a VIEW-AS phrase when you want a fill-in field, unless you want to be explicit. This is the syntax for specifying a fill-in field.
The size phrase is a standard Progress way of describing how much room a widget should occupy. Normally, the size phrase uses this syntax.
Where width and height are decimal constants.
The TOOLTIP attribute allows you to optionally define a text message string that automatically displays when the mouse pointer pauses over the fill-in field.
There is an important relationship between the size-phrase and the format string associated with a fill-in field. As you learned in "Understanding the Database Environment," a format string establishes the defaults for the number of characters a widget can display or accept as input. Progress uses this information to determine the default size of a fill-in field widget. You can override the default Progress format string with the FORMAT option on the DEFINE VARIABLE statement or the format phrase. You can override the default widget size by using the size phrase of the VIEW-AS phrase. Examine the code fragment below:
These notes explain the example highlights:
- When Progress defines this variable, it uses the default format string of x(8) for CHARACTER variables, the default data widget (fill-in field), and creates a default size for the widget based on the format string. (The default size is the width of eight average-width characters.)
- In this example, x(8) is not adequate, so the FORMAT option overrides the default and makes it x(20). Progress still determines the default size (20 average-width characters) based on the new FORMAT option.
- This statement uses a format string of x(40). However, 40 characters take up too much room on the display, so the size phrase shortens the display area to 20 characters. Now the widget displays 20 characters, but can accept up to 40. When a user types beyond the 20th character, the data in the field scrolls to allow the extra input.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |