Update dock reference.

This commit is contained in:
Rodrigo Girão Serrão
2022-12-21 22:19:09 +00:00
parent db9ea459c8
commit 03cbd50d6d

View File

@@ -5,9 +5,11 @@ The `dock` property is used to fix a widget to the edge of a container (which ma
## Syntax ## Syntax
``` ```
dock: top | right | bottom | left; dock: bottom | left | right | top;
``` ```
The option chosen determines the edge to which the widget is docked.
## Examples ## Examples
The example below shows a `left` docked sidebar. The example below shows a `left` docked sidebar.
@@ -53,13 +55,17 @@ The labels will remain in that position (docked) even if the container they are
## CSS ## CSS
```sass ```sass
/* Dock the widget on the left edge of its parent container */ dock: bottom; /* Docks on the bottom edge of the parent container. */
dock: left; dock: left; /* Docks on the left edge of the parent container. */
dock: right; /* Docks on the right edge of the parent container. */
dock: top; /* Docks on the top edge of the parent container. */
``` ```
## Python ## Python
```python ```python
# Dock the widget on the left edge of its parent container widget.styles.dock = bottom; # Dock bottom.
widget.styles.dock = "left" widget.styles.dock = left; # Dock left.
widget.styles.dock = right; # Dock right.
widget.styles.dock = top; # Dock top.
``` ```