Progress
Portability Guide
Designing Alternate Layouts
After designing and testing the master layout, you can create alternate layouts. You can create virtually any number of alternate layouts. Use alternate layouts to customize an interface for a specific display platform.
Anything you add to the master layout is propagated to the alternate layouts until you hide, delete, or adjust them in the alternate layouts. Alternate layout widgets are linked and synchronized to the master layout until you customize them for a layout.
Use the REMOVE-FROM-LAYOUT toggle box to remove a widget from a particular layout. The AppBuilder selectively hides and displays objects, which ensures that your code compiles on all platforms. If you delete objects in one layout and not in another, a trigger might rely on the code that you deleted, and might not compile. The AppBuilder uses the HIDDEN attribute instead of deletion to compile the procedure. This process of displaying certain widgets (while hiding others) allows you to customize each layout to your specifications.
For each alternate layout that you create, you supply a name and run-time expression that specifies under what conditions to use the layout. At run time, your application evaluates the expression, and if TRUE, displays that layout. This expression becomes the selection expression for a CASE statement, indicating what set of run-time attributes to execute. For more information on the CASE statement, see the "Executing the Window Procedure File at Runtime" section.
Creating Alternate Layouts
Follow these steps to create an alternate layout:
- Choose Layout
Alternative Layout from the AppBuilder main window. The Custom Layout dialog box appears.
- Choose the New button. The New Layout Name dialog box appears.
- Type the name of the layout, then choose OK.
- In the Custom Layout dialog box, enter the run-time expression that you want tested in the Expression field, then choose OK.
After you create the alternate layout, the AppBuilder redisplays all of the widgets from the previous layout in your design window. The AppBuilder also displays the name of the alternate layout at the top of the design window.
Any subsequent changes that you make to the layout (except for inserting a new widget) affect that layout only. However, you can force the AppBuilder to synchronize an alternate layout with the master layout on a widget-by-widget basis. That is, you can force a widget in the alternate layout to adopt the same attributes as the corresponding widget in the master layout, and vice versa. For more information, see the Progress AppBuilder Developer’s Guide.
Alternate Layout Attributes
Within an alternate layout, you can change some, but not all, of the attributes that can be changed in the master layout. Table 3–3 lists the attributes that you can change:
NOTE: Character-interface layouts do not support color.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |