Expand description
Grid layout - a geometry manager for arranging widgets.
- also see the Tk manual
The grid-layout is used in a “builder” style to layout a single widget:
ⓘ
widget.grid()
.OPTION(VALUE) // 0 or more
.layout();
grid
is called first, to get the GridLayout instance.layout
must be called last, to perform the layout.- zero or more options are added to the GridLayout, to control the position and layout of the widget.
Example
The following example places a label:
ⓘ
label.grid() // starts layout definition
.row(1) // at row 1
.column(2) // at column 2
.column_span(3) // spanning three columns (i.e. 2,3,4)
.padx(5) // with 5 pixels horizontal spacing
.sticky(rstk::Sticky::E) // "attached" to the right-hand side
.layout(); // completes the layout
Structs
- Refers to the settings for a GridLayout.
Traits
- Common functions for widgets that can be arranged using GridLayouts