Progress
AppBuilder
Developer’s Guide
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 Progress run-time environments: character, MS-Windows, and MS-WIN95. Table B–1 lists the standard layouts.
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.
In general, the changes that you make within an alternate layout visually affect that layout only, but there are some exceptions. For more information, see the "Modifying Layouts–Layout Inheritance" section.
For example, suppose that you start with the master layout, as shown in Figure B–1.
Figure B–1: 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 B–2.
Figure B–2: 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 AppBuilder Interface."
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.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |