Settings group
A titled block of ui.field rows separated by lines, with an optional description, like a settings screen.
ui.settings_group · Category: Data · Full reference →


pz.container(ui.settings_group("Editor", [ ui.field("Font size", ui.number_field(14, on_change, suffix="px")), ui.field("Soft wrap", ui.switch(True, on_toggle)), ui.field("Theme", ui.select(["One Dark", "One Light"], "One Dark", on_select, width=150)),], description="Editor preferences."), width=460)When to use
Section titled “When to use”- To organize a preferences screen into sections (Editor, Files, Git…).
import pyzed as pzfrom pyzed import ui
pz.container(ui.settings_group("Editor", [ ui.field("Font size", ui.number_field(14, on_change, suffix="px")), ui.field("Soft wrap", ui.switch(True, on_toggle)), ui.field("Theme", ui.select(["One Dark", "One Light"], "One Dark", on_select, width=150)),], description="Editor preferences."), width=460)Variants
Section titled “Variants”Options
Section titled “Options”

Code
pz.container(ui.settings_group("Files", [ ui.field("Autosave", ui.switch(True, on_toggle)), ui.field("Trim whitespace", ui.checkbox(False, on_toggle)),]), width=380)

description=Code
pz.container(ui.settings_group("Git", [ ui.field("Inline blame", ui.switch(False, on_toggle)),], description="Shown in the editor gutter."), width=380)States and events
Section titled “States and events”

end=Code
pz.container(ui.settings_group("Editor", [ui.field("Wrap lines", ui.switch(True, on_toggle))], end=ui.button("Reset", on_press, size="sm", variant="ghost")), width=420)Events
Section titled “Events”Settings group has no events of its own: it shows what you give it. Like every widget it also has the 18 common events (click, double_click, right_click, mouse_enter, drag, key_down, resize…), attached with .on(...): see Events and Events of every component.
Properties and API
Section titled “Properties and API”ui.settings_group
Section titled “ui.settings_group”settings_group(title, rows, *, description=None, end=None, theme=None)A titled block of ui.field rows separated by lines, like a settings screen.
| Property | Default | Description |
|---|---|---|
title |
required | Group title. |
rows |
required | The rows (usually ui.field). |
description |
None |
Secondary text. |
end |
None |
Widget at the right of the title (a Reset button…). |
theme |
None |
Theme to use instead of the current one (pyzed.theme.current()). |