Layout commands

Red works with the normal coordinate system, with the origin 0x0 in the top-left corner:

A point with coordinates (n, m) is noted as nxm. Such a pair! value can also be used in the face/offset property, which describes the position of the top-left corner of the face from the origin, in this case n pixels from the left, and m pixels down. It can also be used to move a face to a new position:

;-- see Chapter09/offset.red:t: text "I will not stay here"button "Move text" [t/offset: 20x30] 

By default, Red uses a kind of flow layout represented with the across word. Faces are placed from left to right until the screen line is full, ...

Get Learn Red - Fundamentals of Red now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.