Progress
Portability Guide
Designing the Master Layout
When you create a window procedure file, you automatically create a master layout. The master layout consists of the widgets as defined or created in the window procedure file (in the Control Definitions, Frame Definitions, and Create Window sections). The master layout is the layout as it appears to the Compiler/Analyzer.
Progress Software Corporation recommends that you design the master layout first, since it offers the most flexibility in defining and adjusting layouts. The alternate layouts are all synchronized to the master, until you make adjustments to them. Therefore, complete the master layout before defining any alternate layouts.
The master layout is the basis of each alternate layout. As you modify the alternate layout, the master layout remains unchanged. The AppBuilder implements your changes to the alternate layout by adjusting the master layout at run time.
When you insert a new widget into an alternate layout, the AppBuilder defines the widget in the Control Definitions section of the window procedure file. Therefore, the widget becomes part of the master layout. However, when the user runs the application, both layouts appear as intended. In the master layout, the AppBuilder sets the widget’s HIDDEN attribute to TRUE. In the alternate layout, the AppBuilder sets the HIDDEN attribute to FALSE. The user sees only the widget when the application uses the alternate layout. To hide widgets in a particular layout, activate the Remove From Layout toggle box in the widget’s property sheet.
Different platforms can enable and display different sets of widgets. To specify different views of the same data, you lay out multiple widgets and hide those not used on a particular platform.
NOTE: You must define all possible widgets in the master layout so that the Analyzer and other AppBuilder internal mechanisms recognize and understand these widgets.For this system to work for both graphical and character deployment platforms, the window procedure file is structured so that the CREATE WINDOW statement is not executed while running in character mode. The following code accomplishes this:
The master layout is graphical by default. Design the master layout for the graphical platform that most of your customers use, then design alternate layouts. To change the default setting, choose Options
User Preferences. Then choose the Character Mode radio button.
When you are developing an application to run on Windows and in character environments, Progress Software Corporation recommends that you first design the Windows version, and then the character version. Windows screens tend to contain fewer objects than character screens, so it is easier to port from Windows to character than from character to Windows.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |