Button (lv_btn)
Button (lv_btn)
Overview
Buttons have no new features compared to the Base object. 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 LV_SIZE_CONTENT
Parts and Styles
- LV_PART_MAINThe background of the button. Uses the typical background style properties.
Usage
There are no new features compared to Base object.
Events
- LV_EVENT_VALUE_CHANGEDwhen the- LV_OBJ_FLAG_CHECKABLEflag 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 LV_KEY_ENTER is translated to LV_EVENT_PRESSED/PRESSING/RELEASED etc.
See the events of the Base object too.
Learn more about Keys.
Example
API
警告
doxygenfile: Unable to find project ‘lvgl’ in breathe_projects dictionary
 
                    
                     
                    
                 
                    
                 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号