1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00
lvgl/docs/widgets/list.rst
2023-04-27 19:47:13 +02:00

59 lines
1.1 KiB
ReStructuredText

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**
- :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 `Base objects </widgets/obj>`__ documentation for details.
**Buttons and Texts** See the `Button </widgets/btn>`__\ 's and `Label </widgets/label>`__\ 's documentation.
Usage
*****
Buttons
-------
:cpp:expr:`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
-----
:cpp:expr:`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 :ref:`events`.
Keys
****
No *Keys* are processed by the object type.
Learn more about :ref:`indev_keys`.
Example
*******
.. include:: ../examples/widgets/list/index.rst
API
***