Progress
AppBuilder
Developer’s Guide
Configuring a Basic Combo Box Instance
To configure your Combo Box object, begin by selecting the object and choosing Tools
Property Sheet. The dialog box will open:
![]()
Minimal Configuration
Although you can accept the default values for many object properties, you should at least make these changes:
- Change the Object identifier and Label to better represent the role of this Combo Box in your application.
- Type in the items that will populate the list, one item per line. You might need to change the data type first. See the Define As and Format entries in the "Size and Style Configuration" section.
- If appropriate, choose the Advanced button and, when the Advanced Properties dialog box opens, enter the Initial Value.
Size and Style Configuration
CAUTION: Making this Combo Box Movable or Resizable (Advanced Properties) prevents this object from gaining input focus using the mouse. So if you also set No Tab Stop, 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 Combo Box stays at the same XY location within the enclosing Frame.
- Inner Lines — Type in the number of lines to be displayed by the selection-list component when it is open. The default value is 5 lines.
- Define As — Choose the data type from the list. The default type is CHARACTER, but you can choose DATE, DECIMAL, INTEGER, or LOGICAL instead. AppBuilder will seed the list with a single item of that type.
- Format — Enter the formatting string for the data type you have chosen. If you would prefer to pick the format string from a list rather than enter it by hand, choose the Format button.
- Tooltip — This Combo Box displays any text you enter here whenever the user allows the mouse cursor to hover over it.
- Help ID — If you plan to provide context-sensitive help in your application for this object, type in a unique integer as its identifier.
- Simple / Drop-down / Drop-down List:
- Simple — In this style, you must explicitly make the Selection List component visible at design time, if it is to be visible at all. By default, AppBuilder generates the widget with only the Fill–in visible. Drag the bottom handle to reveal as many lines of list as you like. In this style, the Fill–in element is editable.
- Drop-Down — In this style, the user can open and pick from the list, or type a value into the Fill–in component. You can write code to permanently add the typed-in value to the entries in the list, if you wish, or discard the entry after use.
- Drop-Down List — (Default) In this style, the Fill–in component is read-only—the user cannot type into it. The user can only open and pick from the list. The choice then appears in the Fill–in component. Note that in other major widget taxonomies, a Drop-Down List is a type of Selection List, not a type of Combo Box. Note, too, that this style is not the default for the ActiveX Combo Box.
- Color, Type Style, Popup, String Attributes, Data Field — Choose the appropriate button to set these properties. For further information, see "Frequently Used Dialogs."
- Geometry — Although it is often more convenient to set the XY origin and size of a widget visually in the workspace, you can set those values explicitly here, if you prefer. You can also choose a particular alignment, though the only effect this has is to change the X origin in the source code.
- Auto-completion — Normally cleared. Setting this box causes the Combo Box to attempt to complete the entry the user is typing. This option is only meaningful where the Fill–in portion of the Combo Box is editable.
- Display — Normally set. Clearing this box prevents this Combo Box from automatically populating its Fill–in during initialization.
- Drop Target — Normally cleared. Setting this box causes this Combo Box to experience an event whenever the user drags another object onto it. You must write the appropriate event-handling code.
- Enable — Normally set. Clearing this box makes the Fill–in part unresponsive to input.
- Hidden — Normally cleared. Setting this box prevents the Combo Box from responding to implicit requests to display itself. It will only honor explicit requests.
- No Tab Stop — Normally cleared. Setting this box removes this Combo Box from the enclosing Frame’s traversal list. Normally, pressing the key causes focus to move from one object to the next in the list. When this box is set, the object 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 Combo Box.
- Remove from Layout — Cleared. Cannot be set unless defining an alternate layout.
- Shared — Cleared. Setting this box causes the Combo Box to be reachable outside the defining procedure.
- Sort — Normally cleared. Setting this box causes the Combo Box to always display the items in its drop-down list in sorted order, regardless of their real order.
- Unique Match — Normally cleared. (This option is not available unless you set Auto-Completion.) Setting this box causes the Combo Box to wait for a unique substring before completing the entry.
Advanced Properties
Choose the Advanced button. The Advanced Properties dialog box opens:
![]()
You can change any of the values here that do not meet your needs:
CAUTION: If you make this Combo Box 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 can enter a value here that will appear in the Fill–in component of the Combo Box on startup.
- Help — The text you enter here will display in the status area of the enclosing Window, whenever this object has input focus. If you choose to let this Combo Box inherit the help string defined in the Data Dictionary’s schema, you will not be able to enter text here, even if there is no help string in the schema. If the Combo Box is assigned to a Dialog Box rather than a Window, or if the Window has no status area, this text will not display.
- Private Data — AppBuilder writes this data out as the value of the PRIVATE–DATA attribute. You can write code to make use of this data in any way that meets your needs.
- Generated Code Layout Units — You can elect to have AppBuilder define this object in character (the default) or pixel units, in the source code it generates.
- Custom Lists — The custom lists are macros belonging to the enclosing Frame. They allow you to treat many objects alike without having to refer to them individually. You can include this object in any or all of the lists.
- Geometry — You can set the XY origin and closed size of this Combo Box in pixel units. This section is identical to the corresponding section in the base property sheet apart from the type of units you use.
- 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 Combo Box has input focus.
- Movable — Normally cleared. Setting this box makes it impossible for the user to give this Combo Box input focus by clicking with the mouse. Instead, the user can use the mouse to drag the Combo Box body—but not the label, which stays 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 Combo Box 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 Combo Box.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |