mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add bindings and component classes to reference pages.
This commit is contained in:
@@ -46,11 +46,27 @@ The `Checkbox.Changed` message is sent when the checkbox is toggled.
|
||||
| --------- | ------ | ------------------------------ |
|
||||
| `value` | `bool` | The new value of the checkbox. |
|
||||
|
||||
## Bindings
|
||||
|
||||
The checkbox widget defines directly the following bindings:
|
||||
|
||||
::: textual.widgets.Checkbox.BINDINGS
|
||||
options:
|
||||
show_root_heading: false
|
||||
show_root_toc_entry: false
|
||||
|
||||
## Component Classes
|
||||
|
||||
The checkbox widget provides the following component classes:
|
||||
|
||||
::: textual.widgets.Checkbox.COMPONENT_CLASSES
|
||||
options:
|
||||
show_root_heading: false
|
||||
show_root_toc_entry: false
|
||||
|
||||
## Additional Notes
|
||||
|
||||
- To remove the spacing around a checkbox, set `border: none;` and `padding: 0;`.
|
||||
- The `.checkbox--switch` component class can be used to change the color and background of the switch.
|
||||
- When focused, the ++enter++ or ++space++ keys can be used to toggle the checkbox.
|
||||
|
||||
## See Also
|
||||
|
||||
|
||||
@@ -48,6 +48,24 @@ The example below populates a table with CSV data.
|
||||
|
||||
### ::: textual.widgets.DataTable.ColumnSelected
|
||||
|
||||
## Bindings
|
||||
|
||||
The data table widget defines directly the following bindings:
|
||||
|
||||
::: textual.widgets.DataTable.BINDINGS
|
||||
options:
|
||||
show_root_heading: false
|
||||
show_root_toc_entry: false
|
||||
|
||||
## Component Classes
|
||||
|
||||
The data table widget provides the following component classes:
|
||||
|
||||
::: textual.widgets.DataTable.COMPONENT_CLASSES
|
||||
options:
|
||||
show_root_heading: false
|
||||
show_root_toc_entry: false
|
||||
|
||||
## See Also
|
||||
|
||||
* [DataTable][textual.widgets.DataTable] code reference
|
||||
|
||||
@@ -36,6 +36,14 @@ The `DirectoryTree.FileSelected` message is sent when the user selects a file in
|
||||
| `show_guides` | `bool` | `True` | Show guide lines between levels. |
|
||||
| `guide_depth` | `int` | `4` | Amount of indentation between parent and child. |
|
||||
|
||||
## Component Classes
|
||||
|
||||
The directory tree widget provides the following component classes:
|
||||
|
||||
::: textual.widgets.DirectoryTree.COMPONENT_CLASSES
|
||||
options:
|
||||
show_root_heading: false
|
||||
show_root_toc_entry: false
|
||||
|
||||
## See Also
|
||||
|
||||
|
||||
@@ -32,6 +32,15 @@ widget. Notice how the `Footer` automatically displays the keybinding.
|
||||
|
||||
This widget sends no messages.
|
||||
|
||||
## Component Classes
|
||||
|
||||
The footer widget provides the following component classes:
|
||||
|
||||
::: textual.widgets.Footer.COMPONENT_CLASSES
|
||||
options:
|
||||
show_root_heading: false
|
||||
show_root_toc_entry: false
|
||||
|
||||
## Additional Notes
|
||||
|
||||
* You can prevent keybindings from appearing in the footer by setting the `show` argument of the `Binding` to `False`.
|
||||
|
||||
@@ -57,6 +57,23 @@ The `Input.Submitted` message is sent when you press ++enter++ with the text fie
|
||||
| --------- | ----- | -------------------------------- |
|
||||
| `value` | `str` | The new value in the text input. |
|
||||
|
||||
## Bindings
|
||||
|
||||
The input widget defines directly the following bindings:
|
||||
|
||||
::: textual.widgets.Input.BINDINGS
|
||||
options:
|
||||
show_root_heading: false
|
||||
show_root_toc_entry: false
|
||||
|
||||
## Component Classes
|
||||
|
||||
The input widget provides the following component classes:
|
||||
|
||||
::: textual.widgets.Input.COMPONENT_CLASSES
|
||||
options:
|
||||
show_root_heading: false
|
||||
show_root_toc_entry: false
|
||||
|
||||
## Additional Notes
|
||||
|
||||
|
||||
@@ -63,6 +63,14 @@ or by clicking on it.
|
||||
| --------- | ---------- | --------------------------- |
|
||||
| `item` | `ListItem` | The item that was selected. |
|
||||
|
||||
## Bindings
|
||||
|
||||
The list view widget defines directly the following bindings:
|
||||
|
||||
::: textual.widgets.ListView.BINDINGS
|
||||
options:
|
||||
show_root_heading: false
|
||||
show_root_toc_entry: false
|
||||
|
||||
## See Also
|
||||
|
||||
|
||||
@@ -71,8 +71,23 @@ The `Tree.NodeCollapsed` message is sent when the user expands a node in the tre
|
||||
| --------- | ------------------------------------ | --------------- |
|
||||
| `node` | [TreeNode][textual.widgets.TreeNode] | Collapsed node. |
|
||||
|
||||
## Bindings
|
||||
|
||||
The tree widget defines directly the following bindings:
|
||||
|
||||
::: textual.widgets.Tree.BINDINGS
|
||||
options:
|
||||
show_root_heading: false
|
||||
show_root_toc_entry: false
|
||||
|
||||
## Component Classes
|
||||
|
||||
The tree widget provides the following component classes:
|
||||
|
||||
::: textual.widgets.Tree.COMPONENT_CLASSES
|
||||
options:
|
||||
show_root_heading: false
|
||||
show_root_toc_entry: false
|
||||
|
||||
## See Also
|
||||
|
||||
|
||||
Reference in New Issue
Block a user