lvgl.switch
Display a button showing a switch name. When tapped the switch select popup is opened to allow the user to select a new switch. Uses EdgeTX styling.
Last updated
Was this helpful?
Display a button showing a switch name. When tapped the switch select popup is opened to allow the user to select a new switch. Uses EdgeTX styling.
lvgl.switch([parent], {settings})
parent:switch({settings})
See the API page for parameter description and common settings.
Switch specific settings:
get
Function
Called to get the currently selected switch, when the popup menu is first opened.
nil
set
Function
Called when the user taps on an switch button. The function is passed a single parameter wihich is the selected switch value.
nil
active
Function
Set the enabled / disabled state. Return value must be a boolean - true to enable the control, false to disable.
nil
LVGL object
The popup menu is closed when the user selects an item, and the 'set' function is called.
If the user taps outside the menu or the RTN key is pressed, the popup menu is closed and the 'set' function is not called.
BW radios
Color radios
Only available for One-Time scripts and widgets running in full screen mode.
2.11.0
Introduced
Last updated
Was this helpful?
Was this helpful?