Skip to content

Inspector Input

Every numeric field on an AutoLayout component — Width, Height, Min/Max, Padding, Margin, Gap, WrapGap, ColumnGap, RowGap, and Grid track templates — accepts a unit suffix, a math expression, or a mode name. The field parses what you type and switches modes for you.

Type a unit — the mode flips

Append a unit suffix and the mode dropdown updates automatically. Type a mode name on its own to switch mode while keeping the current value.

Typing into a Width field — the unit you append flips the mode.
Type thisModeResolves to
120pxPixels120 pixels
50%Percentage50 % of parent
1.5xAspectRatiowidth × 1.5 (or height × 1.5)
fill or 1fFill1 weight unit of remaining parent space
hugHugwrap children + padding
ts or textsizeTextSizeintrinsic TMP bounds

Typing a unit switches mode in one keystroke sequence: 120px into a Hug field → Pixels 120; hug into a 200px field → Hug (the old 200 is dropped). Casing is ignored, and each mode has short aliases:

CanonicalAlso accepted
hugh
fillf, *
ts (TextSize)t, textsize
auto (gap distribution)sb, spread
even (gap distribution)sa, rnd

Math expressions

Anything you’d type into a calculator works in a numeric field: + * / and parentheses. A unit suffix can follow the expression, and the result switches the field to that mode.

Type thisResult
1920/3640
(16+8)*248
100*1.5150
100+50px150 px (Pixels)
(100/3)%33.33 % (Percentage)

The evaluator runs System.Data.DataTable.Compute — SQL expression rules, . decimal separator.

Gap distribution modes

Gap and WrapGap accept two distribution modes on top of pixels/percentages. Both ignore the numeric value and share out the parent’s free space.

Type thisEffect
auto, sb, spreadSpace-between — equal gap between children, none at the ends
even, sa, rndSpace-around — equal gap before, between, and after children

Simple numbers apply live (every keystroke rebuilds); units, operators, and parentheses wait for Enter or focus-out so a partial expression like 100+ isn’t evaluated mid-type.

Docs for AutoLayout PRO v1.0.0 Changelog