Open abstract instantiable class
The class of table layouts.
border:<integer>. Default value: 0.
rows:false-or(<integer>). Default value: #f.
columns:false-or(<integer>). Default value: #f.
contents:limited(<sequence>, of: limited(<sequence>, of: <sheet>)).
x-spacing:<integer>. Default value: 0.
y-spacing:<integer>. Default value: 0.
x-ratios:false-or(<sequence>). Default value: #f.
y-ratios:false-or(<sequence>). Default value: #f.
x-alignment:one-of(#"left", #"right", #"center"). Default value: #"left".
y-alignment:one-of(#"top", #"bottom", #"center"). Default value: #"top".
duim-layouts
duim-layouts
The class of table layouts.
The border: init-keyword provides a border of whitespace around the children in the layout, and the value of this init-keyword represents the size of the border in pixels. This basically has the same effect as using the macro with-spacing around the layout, except it uses a simpler syntax.
The rows: and columns: init-keywords are used to specify the number of rows and columns for the table layout.
The contents: init-keyword is used to specify the contents of each cell of the table. It should consist of a sequence of sequences of sheets. If contents: is not specified, you should supply the children of the table with a number of rows and columns. You should not supply both children and rows and columns, however.
The x-spacing: and y-spacing: init-keywords let you specify how much vertical and horizontal space should be inserted, in pixels, between the children of the layout.
The x-ratios: and y-ratios: init-keywords let you specify the proportion of the total horizontal and vertical space that should be taken up by each individual child.
The value passed to x-ratios: needs to be a sequence of as many integers as there are columns of children in the layout. The value passed to y-ratios: needs to be a sequence of as many integers as there are rows of children in the layout. Each child is then allocated the appropriate portion of horizontal and vertical space in the layout, according to the combination of the values for these two keywords.
The two init-keywords can be used on their own, or together, as described in the examples below.
For example, if the value #(1, 2, 3) is specified for the x-ratios: init-keyword of a table layout containing three columns of children, then the first column would claim a sixth of the available horizontal space, the second column would claim a third of the horizontal space, and the third column would claim half the horizontal space, as shown in the diagram below.

Alternatively, if the value #(1, 2, 3) is specified for the y-ratios: init-keyword of a table layout containing three rows of children, then the first row would claim a sixth of the available vertical space, the second row would claim a third of the vertical space, and the third row would claim half the vertical space, as shown in the diagram below.

Finally, if both the x-ratios: and y-ratios: init-keywords are specified, then each child in the layout is affected individually, as shown in the diagram below.

By default, all the children of a table layout are left-aligned. You can specify that they should be right or center-aligned using the x-alignment: keyword.
By default, all the children of a table layout are aligned at the top. You can specify that they should be aligned at the bottom, or in the center, using the y-alignment: keyword.
*t* := make(<vector>, size: 9);
for (i from 1 to 9) *t*[i - 1] :=
make(<button>, label: format-to-string("%d", i)) end;contain(make(<table-layout>,
x-spacing: 10, y-spacing: 0,
children: *t*, columns: 3));