Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 1.39 KB

button.rst

File metadata and controls

66 lines (42 loc) · 1.39 KB

Button (lv_button)

Overview

Buttons have no new features compared to the Base object <lv_obj>. They are useful for semantic purposes and have slightly different default settings.

Buttons, by default, differ from Base object in the following ways: -Not scrollable - Added to the default group - Default height and width set to :cppLV_SIZE_CONTENT

Parts and Styles

  • :cppLV_PART_MAIN The background of the button. Uses the typical background style properties.

Usage

There are no new features compared to Base object <lv_obj>.

Events

  • :cppLV_EVENT_VALUE_CHANGED when the :cppLV_OBJ_FLAG_CHECKABLE flag is enabled and the object is clicked. The event happens on transition to/from the checked state.

Learn more about events.

Keys

Note that the state of :cppLV_KEY_ENTER is translated to :cppLV_EVENT_PRESSED, :cppLV_EVENT_PRESSING and :cppLV_EVENT_RELEASED etc.

See the events of the Base object <lv_obj> too.

Learn more about indev_keys.

Example

API