acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

btn.md (1219B)

      1 ```eval_rst
      2 .. include:: /header.rst
      3 :github_url: |github_link_base|/widgets/core/btn.md
      4 ```
      5 # Button (lv_btn)
      6 
      7 ## Overview
      8 
      9 Buttons have no new features compared to the [Base object](/widgets/obj). They are useful for semantic purposes and have slightly different default settings.
     10 
     11 Buttons, by default, differ from Base object in the following ways:
     12 - Not scrollable
     13 - Added to the default group
     14 - Default height and width set to `LV_SIZE_CONTENT`
     15 
     16 ## Parts and Styles
     17 - `LV_PART_MAIN` The background of the button. Uses the typical background style properties.
     18 
     19 ## Usage
     20 
     21 There are no new features compared to [Base object](/widgets/obj).
     22 
     23 ## Events
     24 - `LV_EVENT_VALUE_CHANGED` when the `LV_OBJ_FLAG_CHECKABLE` flag is enabled and the object is clicked. The event happens on transition to/from the checked state.
     25 
     26 
     27 Learn more about [Events](/overview/event).
     28 
     29 ## Keys
     30 Note that the state of `LV_KEY_ENTER` is translated to `LV_EVENT_PRESSED/PRESSING/RELEASED` etc.
     31 
     32 See the events of the [Base object](/widgets/obj) too.
     33 
     34 Learn more about [Keys](/overview/indev).
     35 
     36 ## Example
     37 ```eval_rst
     38 
     39 .. include:: ../../../examples/widgets/btn/index.rst
     40 
     41 ```
     42 
     43 ## API
     44 
     45 ```eval_rst
     46 
     47 .. doxygenfile:: lv_btn.h
     48   :project: lvgl
     49 
     50 ```