mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
* Change the title of some widget references to their class names The widget reference index had a slight mixture of widget title styles, some being their class name, others being "written English" type titles. This settles on the titles always being the class name. * Add a link to the ContentSwitcher to the widget gallery No screenshot for this, on purpose. By definition this widget isn't visible, except via other widgets that it's enclosing and handling. * Have mkdocs watch the main nav file * Mark the content switcher off the roadmap
936 B
936 B
ListItem
ListItem is the type of the elements in a ListView.
- Focusable
- Container
Example
The example below shows an app with a simple ListView, consisting
of multiple ListItems. The arrow keys can be used to navigate the list.
=== "Output"
```{.textual path="docs/examples/widgets/list_view.py"}
```
=== "list_view.py"
```python
--8<-- "docs/examples/widgets/list_view.py"
```
Reactive Attributes
| Name | Type | Default | Description |
|---|---|---|---|
highlighted |
bool |
False |
True if this ListItem is highlighted |
Attributes
| attribute | type | purpose |
|---|---|---|
item |
ListItem |
The item that was selected. |
See Also
- ListItem code reference