Layout Modes
- Last UpdatedJan 28, 2025
- 2 minute read
Two layout commands are supported, Layout Form and Setup Form. Each one allows the same set of form definition commands, terminated by Exit. The layout commands themselves are very similar, but differ in their default attributes and optional keywords supported. They also have some small but significant behavioral difference.
-
Layout Form (recommended) is the new way of laying out forms:
layout form !!<form_name> {optional keywords}
-
Setup Form is the old familiar scheme:
setup form !!<form_name> {optional keywords}
Two layout modes are supported, VarChars and FixChars.
VarChars (recommended) is based on measuring precise string widths. It is better suited to the use of variably spaced fonts, and removes the need for most uses of the TagWidth specifier. The benefits of using VarChars are:
-
Smaller, more pleasing forms, with no unwanted space.
-
No text wrap-around except, possibly, in conjunction with TagWidth.
-
No truncation of explicitly defined text except, possibly, in conjunction with TagWidth.
FixChars is the old layout mode, retained for backwards compatibility with older PML applications, which is based on the use of notional character width to calculate the approximate size of textual gadgets and gadget tags. Because the calculated sizes are only approximate, you have to make frequent use of the Width and TagWidth attributes of the gadget, and considerable trial and error, to achieve the required layout.
Note:
The recommended layout scheme for all new forms is Layout Form, which mandates VarChars.
It is also highly desirable that all existing forms are converted to VarChars and
Layout Form. Appendix B describes how to carry out this process.
The differences between the two schemes is fully described in the following Figure 17:1.
|
Form Command |
Keywords |
Behavior |
||
|
Shared |
Specific |
Default |
||
|
Layout (recommended) |
DOCUMENT DIALOG BLOCKingdialog DOCKing AUTOALIGN NOALIGN VARCHARS AT SIZE NOQUIT RESIzable CORE |
NOPADding |
NOALIGN VARCHARS |
All auto-placement attributes (PATH, HDIST, VALIGN, VDIST, HALIGN) are saved when a new Frame gadget is created, and restored at its exit. |
|
Setup |
FIXCHARS |
AUTOALIGN FIXCHARS |
Only the auto-placement attributes (HDIST, VDIST) are saved when a new Frame gadget is created, and restored at its exit. |
|
Notes
-
The recommendation for all new forms is to use Layout Form.
-
It is also highly recommended that all existing forms are converted to Layout form. For further information, refer to Converting a Form to VarChars and Layout Form.
-
VarChars layout mode is mandatory for Layout Form (FixChars is not valid).
-
The default layout mode for Setup Form is FixChars (for backwards compatibility) but can be overridden using the 'VarChars' keyword.
-
NOALIGN just means no auto-align.
-
NOPADDING sets the form and frame edge padding and initial Vdist and Hdist to zero. It is only available to Layout Form.
-
AUTOALIGN, NOALIGN, and VARCHARS keywords are available in both layout modes to assist with trial conversion of PML Appware by simple Global editing of the Setup Form commands.