aboutsummaryrefslogtreecommitdiff
path: root/docs/widgets/list.rst
blob: 01b887a0e23709ba7627235bc649cbb8986a39a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.. _lv_list:

==============
List (lv_list)
==============

Overview
********

The List is basically a rectangle with vertical layout to which Buttons
and Texts can be added

.. _lv_list_parts_and_styles:

Parts and Styles
****************

**Background**

- :cpp:enumerator:`LV_PART_MAIN` The main part of the list that uses all the typical background properties
- :cpp:enumerator:`LV_PART_SCROLLBAR` The scrollbar. See the :ref:`Base objects <lv_obj>` documentation for details.

**Buttons and Texts** See the :ref:`Button <lv_button>`\ 's and :ref:`Label <lv_label>`\ 's documentation.

.. _lv_list_usage:

Usage
*****

Buttons
-------

:cpp:expr:`lv_list_add_button(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
-----

:cpp:expr:`lv_list_add_text(list, text)` adds a text.

.. _lv_list_events:

Events
******

No special events are sent by the List, but sent by the Button as usual.

Learn more about :ref:`events`.

.. _lv_list_keys:

Keys
****

No *Keys* are processed by the object type.

Learn more about :ref:`indev_keys`.

.. _lv_list_example:

Example
*******

.. include:: ../examples/widgets/list/index.rst

.. _lv_list_api:

API
***