Skip to content
On this page

Roller

A roller is a commonly used interface element for selecting from a set of predefined options. It is often used for setting options, adjusting values, or selecting from a group of related choices.

For more detailed information, you can refer to this link: https://docs.lvgl.io/8.3/widgets/core/roller.html

Properties

A roller has several properties to define its behavior and appearance.

  • Mode: The scrolling mode allows users to select options by scrolling; the infinite mode allows users to infinitely scroll and select options.
  • Default selected: Used to set the default selected item in the roller.
  • Add options: Used to add a scrolling list of options to the roller.
Roller Properties
Scroll modeLV_ROLLER_MODE_NORMAL
Infinite modeLV_ROLLER_MODE_INFINITE
Default selectedlv_roller_set_selected
Add optionslv_roller_set_options

Styles

The roller also has some styles to define its appearance and style.

  • MAIN: Used to set the style of the roller body.
  • SELECTED: Used to set the style of the selected part of the roller.

Example

roller_1.png