You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ndg/lib/lvgl/docs/widgets/extra/list.md

52 lines
1.1 KiB
Markdown

# List (lv_list)
## Overview
The List is basically a rectangle with vertical layout to which Buttons and Texts can be added
## Parts and Styles
**Background**
- `LV_PART_MAIN` The main part of the list that uses all the typical background properties
- `LV_PART_SCROLLBAR` The scrollbar. See the [Base objects](/widgets/obj) documentation for details.
**Buttons and Texts**
See the [Button](/widgets/core/btn)'s and [Label](/widgets/core/label)'s documentation.
## Usage
### Buttons
`lv_list_add_btn(list, icon, text)` adds a full-width button with an icon - that can be an image or symbol - and a text.
The text starts to scroll horizontally if it's too long.
### Texts
`lv_list_add_text(list, text)` adds a text.
## Events
No special events are sent by the List, but sent by the Button as usual.
Learn more about [Events](/overview/event).
## Keys
No *Keys* are processed by the object type.
Learn more about [Keys](/overview/indev).
## Example
```eval_rst
.. include:: ../../../examples/widgets/list/index.rst
```
## API
```eval_rst
.. doxygenfile:: lv_list.h
:project: lvgl
```