UI module

tab_bar

procedureextensionexperimentalsince 0.31.0Source

A row of tabs.

Example↗
ui := headless();
defer free_ui(*ui);
frame(*ui, *ui, (u: *UI_State) {
    for tab_bar() { tab("One", true); tab("Two", false); }
});
assert(find_role(*ui, .TAB_LIST) != null);
tab_bar :: (style: Style = .{}, loc := #caller_location) -> Container

A row of tabs.

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

Example↗
ui := headless();
defer free_ui(*ui);
frame(*ui, *ui, (u: *UI_State) {
    for tab_bar() { tab("One", true); tab("Two", false); }
});
assert(find_role(*ui, .TAB_LIST) != null);

See also