mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Use autodoc for DataTable Messages reference
This commit is contained in:
1
docs/api/coordinate.md
Normal file
1
docs/api/coordinate.md
Normal file
@@ -0,0 +1 @@
|
||||
::: textual.coordinate.Coordinate
|
||||
@@ -22,32 +22,31 @@ The example below populates a table with CSV data.
|
||||
|
||||
## Reactive Attributes
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|-----------------|--------------|--------------------|---------------------------------------------------------|
|
||||
| `show_header` | `bool` | `True` | Show the table header |
|
||||
| `fixed_rows` | `int` | `0` | Number of fixed rows (rows which do not scroll) |
|
||||
| `fixed_columns` | `int` | `0` | Number of fixed columns (columns which do not scroll) |
|
||||
| `zebra_stripes` | `bool` | `False` | Display alternating colors on rows |
|
||||
| `header_height` | `int` | `1` | Height of header row |
|
||||
| `show_cursor` | `bool` | `True` | Show the cursor |
|
||||
| `cursor_type` | `str` | `"cell"` | One of `"cell"`, `"row"`, `"column"`, or `"none"` |
|
||||
| `cursor_cell` | `Coordinate` | `Coordinate(0, 0)` | The coordinates of the cell the cursor is currently on |
|
||||
| `hover_cell` | `Coordinate` | `Coordinate(0, 0)` | The coordinates of the cell the _mouse_ cursor is above |
|
||||
| Name | Type | Default | Description |
|
||||
|-----------------|---------------------------------------------|--------------------|---------------------------------------------------------|
|
||||
| `show_header` | `bool` | `True` | Show the table header |
|
||||
| `fixed_rows` | `int` | `0` | Number of fixed rows (rows which do not scroll) |
|
||||
| `fixed_columns` | `int` | `0` | Number of fixed columns (columns which do not scroll) |
|
||||
| `zebra_stripes` | `bool` | `False` | Display alternating colors on rows |
|
||||
| `header_height` | `int` | `1` | Height of header row |
|
||||
| `show_cursor` | `bool` | `True` | Show the cursor |
|
||||
| `cursor_type` | `str` | `"cell"` | One of `"cell"`, `"row"`, `"column"`, or `"none"` |
|
||||
| `cursor_cell` | [Coordinate][textual.coordinate.Coordinate] | `Coordinate(0, 0)` | The coordinates of the cell the cursor is currently on |
|
||||
| `hover_cell` | [Coordinate][textual.coordinate.Coordinate] | `Coordinate(0, 0)` | The coordinates of the cell the _mouse_ cursor is above |
|
||||
|
||||
## Messages
|
||||
|
||||
### CellHighlighted
|
||||
### ::: textual.widgets.DataTable.CellHighlighted
|
||||
|
||||
The `DataTable.CellHighlighted` message is emitted by the `DataTable` widget when the cursor moves
|
||||
to highlight a new cell. It's also emitted when the cell cursor is re-enabled (by setting `show_cursor=True`),
|
||||
and when the cursor type is changed to `"cell"`.
|
||||
### ::: textual.widgets.DataTable.CellSelected
|
||||
|
||||
#### Attributes
|
||||
### ::: textual.widgets.DataTable.RowHighlighted
|
||||
|
||||
| Attribute | Type | Description |
|
||||
|--------------|----------------------------------------------|----------------------------------|
|
||||
| `value` | `CellType` | The value contained in the cell. |
|
||||
| `coordinate` | [Coordinate][textual.coordinates.Coordinate] | The coordinate of the cell. |
|
||||
### ::: textual.widgets.DataTable.RowSelected
|
||||
|
||||
### ::: textual.widgets.DataTable.ColumnHighlighted
|
||||
|
||||
### ::: textual.widgets.DataTable.ColumnSelected
|
||||
|
||||
## See Also
|
||||
|
||||
|
||||
Reference in New Issue
Block a user