tui.grid
tui.grid PARENT ROWS COLS FIT ROW_WEIGHTS COL_WEIGHTS NAME...
Lays NAME... out as a grid of cells inside PARENT, row by row.
Parameters
ROWS,COLS: grid size. Either may be""and is then computed from the number of names; both empty gives a near-square grid.FIT: what happens to cells with no name.pack(default when"") keeps them as empty panes;stretchlets the row’s other cells absorb them.ROW_WEIGHTS,COL_WEIGHTS: space-separated weights, e.g."1 2".""= all1.NAME...: cell pane names, row-major.
Notes
- All six leading parameters are positional; pass
""for the ones you skip. - Built from a
tui.vsplitinto rows namedPARENT_row0,PARENT_row1, … and antui.hsplitper row. Blankpackcells are namedPARENT_rowR_cC_blank. tui.get.splitonPARENTprintsv.
Example
tui.grid dash 2 3 pack "" "2 1 1" cpu mem disk net io load
See also: tui.factory.grid, tui.fixed
