A container that lays its children out top to bottom.
- style: layout and paint options for the container.
- loc: the call site. It identifies the widget from one frame to the next, so leave the default.
ui := headless();
defer free_ui(*ui);
frame(*ui, *ui, (u: *UI_State) {
for column(.{ gap = 10 }) {
label("top");
label("bottom");
}
});
assert(find_label(*ui, "bottom").rect.y > find_label(*ui, "top").rect.y);column :: (style: Style = .{}, loc := #caller_location) -> Container
A container that lays its children out top to bottom.
Parameters
- style: Style = .{}
- layout and paint options for the container.
- loc := #caller_location
- the call site. It identifies the widget from one frame to the next, so leave the default.
Returns
ui := headless();
defer free_ui(*ui);
frame(*ui, *ui, (u: *UI_State) {
for column(.{ gap = 10 }) {
label("top");
label("bottom");
}
});
assert(find_label(*ui, "bottom").rect.y > find_label(*ui, "top").rect.y);