skip to main content
OpenEdge Development: AppBuilder
Multiple Layouts : Two types of layouts
Two types of layouts
A procedure file can contain two types of layouts:
*Master layout — The main layout of the application. A procedure file has one master layout.
*Alternate layout — An additional layout for a specific run‑time environment. A procedure file can have multiple alternate layouts.
The following sections describe the characteristics of these types of layouts.
Master layout
The master layout is what the AppBuilder regards as the main layout of the procedure file. When you first create a procedure file, you see the master layout in the design window. If you do not create any alternate layouts, you see the master layout when you run the procedure file. You also see the master layout if the run‑time expressions for all of the alternate layouts evaluate to FALSE.
It is helpful to think of the master layout as the compile‑time layout, or the layout as it appears to the ABL Virtual Machine (AVM). Unlike other layouts, the master layout does not necessarily require additional property assignments. Alternate layouts, in contrast, are implemented solely through the use of run‑time property assignments.
The master layout consists of the following elements:
*All of the static widget definitions generated by the AppBuilder in the procedure file.
*All of the property assignments, if any, in the Runtime Attributes and AppBuilder Settings code section.
*The procedure file’s window (a dynamic widget) and any ActiveX control frames.
*A CASE statement entry for “Master Layout”.
The master layout never has a run‑time expression associated with it.
If desirable, you can run the “Master Layout” entry or any other CASE statement entry from within the procedure file. This allows you to alternate programmatically between layouts at run time. For more information, see the “Switching between layouts at run time” section.
Alternate layout
An alternate layout is a layout that you create for a specific run‑time instance. For each alternate layout that you create, you supply a name, an optional run‑time expression, and the emulation style (graphical or character). At run time, the procedure file tests any run‑time expression, and if the expression evaluates to TRUE, the procedure file uses that layout, executing the appropriate CASE statement entry. If the procedure file is a SmartObject that has an ObjectLayout property setting, the SmartObject uses the specified layout, executing the appropriate CASE statement entry. The procedure file thus determines the layout before enabling or displaying any widgets. For more information about creating an alternate layout, see the “Creating alternate layouts” section.
Standard layouts
Standard layouts are alternate layouts with predefined run‑time expressions. The AppBuilder predefines these expressions for three primary OpenEdge run‑time environments: character, MS‑Windows, and MS‑WIN95.
Table 15 lists the standard layouts.
Table 15: Standard layouts and run‑time expressions 
Layout name
Run‑time expression
Standard Character
Standard MS‑Windows
Standard Windows 95
If you decide to use a standard layout, you cannot change the layout’s name or run‑time expression.
Layouts at design time
When you create or select an alternate layout, the AppBuilder changes the design window to assume the alternate layout’s characteristics. The AppBuilder also reflects the characteristics of the layout in the property sheets of its widgets. Once widgets are in an alternate layout, you can then manipulate them within the layout or change their properties. Within an alternate layout, you can modify some but not all of the widgets’ properties. For more information, see the “Alternate layout limitations” section.
The changes you make in an alternate layout visually affect that layout only, but there are some exceptions. For more information, see the “Modifying layouts with layout inheritance” section. For example, suppose you start with the master layout shown in Figure 60.
Figure 60: Master layout
Now, suppose that you choose the Standard Character layout option in the Alternate Layout dialog box. The AppBuilder now changes the design window to look like the one in Figure 61.
Figure 61: Character alternate layout
Notice that image disappears and the buttons appear as text. Also, the grid changes to reflect the number of lines in a character terminal. For more information, see the “Simulating character applications” section.
All property sheets for the widgets in this layout reflect the characteristics of the new layout. In this example, the property sheet of the window reflects a change in size: character windows are not resizable and have a default size of 80 x 21 character units. Also, since the image does not appear in this layout, you cannot access its property sheet from within the layout. However, you can use the List Objects dialog box to access the image’s property sheet. For more information about the List Objects dialog box, see the “Tool bar” section.
In general, when you initially create an alternate layout, the AppBuilder tries to keep all objects and properties unchanged from the prior layout.
Alternate layout scope
When you create a layout, it is available for all procedure files that you edit in the AppBuilder session. You do not have to define the layout individually for every procedure file that uses it.
The AppBuilder maintains a cumulative list of nonstandard layouts for each AppBuilder session. This list expands as you edit procedure files with previously defined layouts. Restarting the AppBuilder resets the list to include only the standard layouts and those alternate layouts used by the procedure files that you open.