Create a grid with columns columns and rows rows, all autoSize.
Place widget in the cell at column/row. Returns a GridItem whose fluent span/aligned/alignH/alignV/pad methods configure it.
Place a nested sizer in the cell at column/row; see add.
Number of columns.
Number of placed children.
Number of rows.
Set the sizing rule for column index.
Set the sizing rule for row index.
Set the pixel gap between columns (horizontal) and rows (vertical).
Arrange the children within availableArea.
The natural size this sizer would like, given its children.
Add a widget child and return its SizerItem for fluent configuration: box.add(w).proportion(1).pad(Padding.all(8)).alignV(VAlign.middle). A bare add(w) gives a non-stretching child (proportion 0) with no padding.
Add a nested sizer and return its SizerItem for fluent configuration.
Number of child items.
A table layout: a fixed grid of columns and rows, each independently sized to its content (autoSize), a fixed pixel size (absolute) or a weighted share of the leftover space (percent). Widgets and nested sizers are placed into cells by column/row and may span several columns or rows. Within its cell a child fills the available space by default, or keeps its preferred size and aligns (start/center/end) — see GridItem.
This is Deft's analog of WinForms' TableLayoutPanel: pick the column and row counts, mark each track auto or percent (or pixels), and drop children into cells without computing any coordinates. add returns a GridItem whose fluent span/aligned/pad methods read better than positional arguments:
Tracks default to autoSize. Auto track sizes are measured from the cells that do not span (a spanning child is placed across the already-computed tracks but does not enlarge them).