skip to main content
OpenEdge Development: AppBuilder
Organizer Objects : SmartDialogs
 
SmartDialogs
SmartDialogs are special‑purpose, outer‑level organizer objects, technically a type of frame with a dedicated, inseparable window. They are members of the SmartContainer class, and can integrate other SmartObjects. They differ from SmartWindows in the following ways:
*They cannot serve as the main window of your application.
*They cannot have a menu bar.
*They cannot be resized at run time or scrolled.
*They cannot generate or accept SmartLinks of type Filter.
*They can accept other widgets placed directly on them (that is, without interposing a separate frame).
Because they are always modal, they must be dismissed before any other window can gain focus, so the number of roles they can play is not large. You will typically want to use them to capture user input without which your program cannot continue.
Configuring SmartDialog visual properties
Many of the properties of a SmartDialog are the same as those of a SmartWindow. The principal differences are:
*There is nothing related to resizing, scrolling, or virtual versus actual size, since the size of a SmartDialog is fixed at design time.
*There is no provision for defining a menu bar, since a SmartDialog is limited to pop‑up menus.
You can invoke the Tab Editor if you wish to define a special TAB‑traversal order, since a SmartDialog is technically a frame and maintains a traversal list. For information about setting traversal order, see the “Traversal-path editor” section.
To open the property sheet, shown in Figure 20, double‑click on the client area of the SmartDialog, or choose ToolsProperty Sheet.
Figure 20: SmartDialog Property Sheet
Minimal configuration changes
Although you can choose to accept many default settings, you should at least ensure that each SmartDialog you create is uniquely identifiable. To individualize this SmartDialog, make these changes:
*Replace the generic instance identifier with one that more closely describes the dialog instance you are creating here. The instance identifier is the token that will appear in the source code, and is the default value for the filename. Note that OpenEdge identifiers for dialog objects are conventionally prefixed with a g.
*Change the generic title bar text to a string that identifies this particular dialog.
Miscellaneous properties (other settings)
Dialogs have fewer miscellaneous properties than windows do, but those they have in common have the same meaning in both contexts. Dialogs also have a few properties in common with frames:
*No Auto Validate — Normally cleared. Setting this box turns off, for all field‑level objects in the dialog box, the automatic validation defined in the Data Dictionary.
*Open the Query — Normally cleared. Setting this box automatically populates the fields in this dialog box, if there is a query defined.
*Use Dict Exps — Normally cleared. Setting this box makes all the validation expressions and help strings defined in the Data Dictionary available to all the widgets assigned to this SmartDialog.
Advanced properties
Clicking Advanced in the property sheet opens the Advanced Properties dialog box:
The only differences between a window and a dialog in advanced properties are:
*Dialog boxes are always modal, so there is no option to make them always appear in front of other objects. Modal objects always appear in front of other objects.
*Dialog boxes have an option to allow box‑selection, normally cleared. Box‑selection is sometimes called marquee‑selection or lasso‑selection. It refers to selecting more than one object by dragging a dynamically generated box (the marquee) around them.
Configuring SmartDialog procedure settings
The SmartDialog uses the standard Procedure Settings dialogs. See the “Procedure settings” section and the “Advanced procedure settings” section for more information.