mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 06:41:14 +00:00
doc: Separate groupbox docs into a file of its own
That was probably an oversight
This commit is contained in:
parent
89bd7dc38b
commit
85fea499ed
3 changed files with 28 additions and 26 deletions
|
@ -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"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
27
docs/reference/src/language/widgets/groupbox.md
Normal file
27
docs/reference/src/language/widgets/groupbox.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: MIT -->
|
||||
|
||||
## `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"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
|
@ -17,6 +17,7 @@ Widgets
|
|||
checkbox.md
|
||||
combobox.md
|
||||
gridbox.md
|
||||
groupbox.md
|
||||
horizontalbox.md
|
||||
lineedit.md
|
||||
listview.md
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue