Gadget Boxes, Containers and Grid Co-ordinates
- Last UpdatedMar 10, 2023
- 2 minute read
Every gadget has a placement point at its top left-hand corner, and a width and height, which together define a notional gadget box.
Frame gadgets are special, because they are also containers for holding other gadgets A Frame has two regions, a title bar, which displays its tag text, and a client area that contains its gadgets (the clients). In most respects, the Form acts as a frame, but there are some minor differences, which are explained it the text.
The client area has a notional grid with an origin (0.0, 0.0) near its top left-hand corner. It has a small padding space border, so that its gadget's do not generally touch the bounding box.
-
The grid horizontal pitch is the notional character width for the system font.
Note:
This font is now always variably spaced, so n horizontal grid units no longer equate to n characters. Generally, it is more than n unless the string has a high proportion of wide characters, for example, capitals, numerals, Ws, Ms. It is important that you understand this concept when you specify gadget sizes.
-
The grid vertical pitch is the line-height, which is the height of the tallest of the textual single-line gadgets: TOGGLE, BUTTON, OPTION, TEXT, or single-line PARAGRAPH.
Note:
The AUTOALIGN attribute of a form causes these gadgets to be (roughly) center-aligned for Path Right, but this is no longer recommended as it interferes with auto-placement. For the layout modes, refer to NOALIGN and current default settings.

The extremities of a gadget box (gadget limits) are referred to as XMIN.gadget, YMIN.gadget, XMAX.gadget and YMAX.gadget.

The Forms limits are referred to as XMIN form, YMIN form, XMAX form and YMAX form.
When gadgets are added to a container, the XMAX and YMAX limits grow to include the gadget boxes.