Software Customisation
Reference Manual
Summary of Objects, Members and Methods
:
Gadget Syntax Graphs
: Setting-Up the Gadget’s Position: <fgpos> and <fgprl>
Setting-Up the Gadget’s Position: <fgpos> and <fgprl>
You can use the AT syntax, shown below on the <fgpos> graph, to define the position of a gadget’s origin within a form.
You can specify the position absolutely (in form layout grid units) or relative to the extremities of existing gadgets, or relative to the size of the form and the gadget.
>-- <fgpos> -- AT --+- val val -------------------------------.
+- X val ------------. |
+- XMIN -. | |
+- XCEN -| | |
+- XMAX -+- <fgprl> -| |
‘--------‘-----------+- Y val ------------|
+- YMIN -. |
+- YCEN -| |
+- YMAX ‑‘- <fgprl> -|
‘--------------------‘-->
The subgraph <fgprl>, shown below, sets the gadget position relative to another gadget or the form’s extent. For example, you can use it to position a gadget halfway across the width of a form.
>-- <fgprl> --+- <gname> -.
+-- FORM ---|
‘-----------+- * val -----.
| |
+- + val --. |
+- - val ‑-‘--+- + val * SIZE ---.
| +- - val * SIZE ---|
| +- + SIZE ---------|
| +- - SIZE ---------|
| ‘------------------|
+- + SIZE -----------------------|
+- - SIZE -----------------------|
‘--------------------------------‘-->
Examples of Using the AT Syntax
AT 5 7.5
Puts gadget origin at form grid coordinates (5, 7.5).
AT X 5.5
Puts gadget origin at form grid coordinates (5.5, y) where y is calculated automatically from the y extremity of the last placed gadget and the current VDISTANCE setting.
AT YMAX+1
Positions new gadget at (x, y) where x is calculated automatically from the x extremity of the last placed gadget and the current HDISTANCE setting. y is at YMAX+1 of the last gadget.
AT XMIN.GAD1-2 YMAX.GAD2+1
Positions new gadget with respect to two existing gadgets. Gadget is offset by 2 grid units to the left of GAD1(X=XMIN-2) and 1 unit below .GAD2 (Y=YMAX+1).
AT XMAX FORM-SIZE YMAX FORM-SIZE
XMAX FORM refers to the current right hand size of the form at its current stage of definition (not its final maximum extent). YMAX FORM refers to the form’s current bottom extent. The -SIZE option subtracts the size of the gadget being positioned in the form. This example positions the gadget at the extreme right-hand bottom edge of the form.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.