List (lv_list)

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

Edit on GitHub

Overview

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

Parts and Styles

Background

Buttons and Text

Usage

Buttons

lv_list_add_button(list, icon, text) adds a full-width button with an icon (that can be an image or symbol) and text. This function returns a pointer to the button created, which you can use to, for example, add an event call-back.

The text is scrolled horizontally if it is longer than the button.

Text

lv_list_add_text(list, text) adds a text string. This function returns a pointer to the label created, which you can use to, for example, change its text with one of the lv_label_set_text...() functions.

Events

No special events are sent by List Widgets, but events can be sent by Buttons as usual.

Further Reading

Learn more about Events emitted by all Widgets.

Learn more about events.

Keys

No Keys are processed by List Widgets.

Further Reading

Learn more about Keys.

Examples

Simple List

Sorting a List using up and down buttons

API

How is this guide?

Last updated on

On this page