1# List (lv_list)
2
3## Overview
4The List is basically a rectangle with vertical layout to which Buttons and Texts can be added
5
6## Parts and Styles
7
8**Background**
9- `LV_PART_MAIN` The main part of the list that uses all the typical background properties
10- `LV_PART_SCROLLBAR` The scrollbar. See the [Base objects](/widgets/obj) documentation for details.
11
12**Buttons and Texts**
13See the [Button](/widgets/core/btn)'s and [Label](/widgets/core/label)'s documentation.
14
15## Usage
16
17### Buttons
18`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.
19
20The text starts to scroll horizontally if it's too long.
21
22### Texts
23`lv_list_add_text(list, text)` adds a text.
24
25
26## Events
27No special events are sent by the List, but sent by the Button as usual.
28
29Learn more about [Events](/overview/event).
30
31## Keys
32No *Keys* are processed by the object type.
33
34Learn more about [Keys](/overview/indev).
35
36## Example
37
38```eval_rst
39
40.. include:: ../../../examples/widgets/list/index.rst
41
42```
43
44## API
45
46```eval_rst
47
48.. doxygenfile:: lv_list.h
49  :project: lvgl
50
51```
52