PML Customisation
User Guide
Form Layout
:
Auto-placement
: Default First Gadget Position in Containers
Default First Gadget Position in Containers
The default auto-placement position of the first gadget in a container (Frame or Form) defines the notional origin of the container's grid.
It is dependent on the current values of HDIST and VDIST, the height of any title text and the horizontal and vertical cosmetic edge-padding which surrounds the container.
The code snippet taken from the example form shown in Fig 17:3, illustrates this.
layout form !!usingVarChars dialog
...
paragraph .para1 text 'Simple form layout using VarChars'
frame .frame1 |frame1: See my gadgets|
paragraph .para2 text 'text positioned implicitly in frame1'
. . .
exit
. . .
exit
The first gadget on the Form, paragraph .para1, is auto-placed (i.e. it has no specified position). Its position is equivalent to all of the following:
paragraph .para1 at xmin ymin
paragraph .para1 at xmin form ymin form
paragraph .para1 at 0 0
Similarly for .para2, the first gadget in .frame1 is auto-placed. Its position is equivalent to all of the following:
paragraph .para2 at xmin ymin
paragraph .para2 at xmin.frame1 ymin.frame1
paragraph .para2 at 0 0
Notes:
1.
Clearly it is better to use auto-placement, than the AT syntax wherever possible
You can change the size of the space surrounding the form or a frame by changing the values of HDIST and VDIST.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.