1.. _lv_list:
2
3==============
4List (lv_list)
5==============
6
7
8Overview
9********
10
11The List Widget is basically a rectangle with vertical layout to which Buttons
12and Text can be added.
13
14
15.. _lv_list_parts_and_styles:
16
17Parts and Styles
18****************
19
20**Background**
21
22- :cpp:enumerator:`LV_PART_MAIN` The main part of the List that uses the
23  :ref:`typical background style properties <typical bg props>`.
24- :cpp:enumerator:`LV_PART_SCROLLBAR` The scrollbar. See :ref:`base_widget`
25  documentation for details.
26
27**Buttons and Text**
28
29- See the :ref:`Button <lv_button>`'s and :ref:`Label <lv_label>`'s documentation.
30
31
32.. _lv_list_usage:
33
34Usage
35*****
36
37Buttons
38-------
39
40:cpp:expr:`lv_list_add_button(list, icon, text)` adds a full-width button with an icon
41(that can be an image or symbol) and text.  This function returns a pointer to the
42button created, which you can use to, for example, add an event call-back.
43
44The text is scrolled horizontally if it is longer than the button.
45
46Text
47----
48
49:cpp:expr:`lv_list_add_text(list, text)` adds a text string.  This function returns a
50pointer to the label created, which you can use to, for example, change its text
51with one of the ``lv_label_set_text...()`` functions.
52
53
54
55.. _lv_list_events:
56
57Events
58******
59
60No special events are sent by List Widgets, but events can be sent by Buttons as usual.
61
62.. admonition::  Further Reading
63
64    Learn more about :ref:`lv_obj_events` emitted by all Widgets.
65
66    Learn more about :ref:`events`.
67
68
69
70.. _lv_list_keys:
71
72Keys
73****
74
75No *Keys* are processed by List Widgets.
76
77.. admonition::  Further Reading
78
79    Learn more about :ref:`indev_keys`.
80
81
82
83.. _lv_list_example:
84
85Example
86*******
87
88.. include:: ../../examples/widgets/list/index.rst
89
90
91
92.. _lv_list_api:
93
94API
95***
96