diff --git a/docs/reference/src/language/widgets/gridbox.md b/docs/reference/src/language/widgets/gridbox.md index 6734a694d..d8dc20f2c 100644 --- a/docs/reference/src/language/widgets/gridbox.md +++ b/docs/reference/src/language/widgets/gridbox.md @@ -3,29 +3,3 @@ A `GridBox` is a [`GridLayout`](../builtins/elements.md#gridlayout) where the spacing and padding values depend on the style instead of defaulting to 0. - -## `GroupBox` - -A `GroupBox` is a container that groups its children together under a common title. - -### Properties - -- **`enabled`**: (_in_ _bool_): Defaults to true. When false, the groupbox can't be interacted with -- **`title`** (_in_ _string_): A text written as the title of the group box. - -### Example - -```slint -import { GroupBox , VerticalBox, CheckBox } from "std-widgets.slint"; -export component Example inherits Window { - width: 200px; - height: 100px; - GroupBox { - title: "Groceries"; - VerticalLayout { - CheckBox { text: "Bread"; checked: true ;} - CheckBox { text: "Fruits"; } - } - } -} -``` diff --git a/docs/reference/src/language/widgets/groupbox.md b/docs/reference/src/language/widgets/groupbox.md new file mode 100644 index 000000000..c2f488d00 --- /dev/null +++ b/docs/reference/src/language/widgets/groupbox.md @@ -0,0 +1,27 @@ + + +## `GroupBox` + +A `GroupBox` is a container that groups its children together under a common title. + +### Properties + +- **`enabled`**: (_in_ _bool_): Defaults to true. When false, the groupbox can't be interacted with +- **`title`** (_in_ _string_): A text written as the title of the group box. + +### Example + +```slint +import { GroupBox , VerticalBox, CheckBox } from "std-widgets.slint"; +export component Example inherits Window { + width: 200px; + height: 100px; + GroupBox { + title: "Groceries"; + VerticalLayout { + CheckBox { text: "Bread"; checked: true ;} + CheckBox { text: "Fruits"; } + } + } +} +``` diff --git a/docs/reference/src/language/widgets/index.rst b/docs/reference/src/language/widgets/index.rst index dcff09929..0e120ed9c 100644 --- a/docs/reference/src/language/widgets/index.rst +++ b/docs/reference/src/language/widgets/index.rst @@ -17,6 +17,7 @@ Widgets checkbox.md combobox.md gridbox.md + groupbox.md horizontalbox.md lineedit.md listview.md