Constants
Constants defined for use in LVGL layouts.
lvgl.FLOW_ROW
Sets flex layout flow.
lvgl.FLOW_COLUMN
Set flex layout flow.
lvgl.PAD_TINY
2 pixel padding.
lvgl.PAD_SMALL
4 pixel padding.
lvgl.PAD_MEDIUM
6 pixel padding.
lvgl.PAD_LARGE
8 pixel padding.
lvgl.PAD_OUTLINE
Padding required around controls for focus outline.
lvgl.PAD_BORDER
Padding size of the default border around controls.
Constants for the 'filter' property of the lvgl.source control. Can be used to limit which sources the user can select.
lvgl.SRC_ALL
Allow all source types, enable the 'Clear' button and the 'Invert' button.
lvgl.SRC_INPUT
Inputs
lvgl.SRC_STICK
Analog sticks
lvgl.SRC_POT
Pots and sliders
lvgl.SRC_SWITCH
Switches
lvgl.SRC_CHANNEL
Outputs
lvgl.SRC_TRIM
Trims
lvgl.SRC_LOGICAL_SWITCH
Logical switches
lvgl.SRC_GVAR
Global variables
lvgl.SRC_LUA
Custom Lua mix script outputs
lvgl.SRC_OTHER
MIN, MAX, tx battery, timers etc.
lvgl.SRC_HELI
Heli channels
lvgl.SRC_TRAINER
Trainer channels
lvgl.SRC_TELEM
Telemetry sensors
lvgl.SRC_CLEAR
Special value to control the 'Clear' button in the source chooser.
lvgl.SRC_INVERT
Special value to control the 'Invert' button in the source chooser.
Constants for the 'filter' property of the lvgl.witch control. Can be used to limit which sources the user can select.
lvgl.SW_ALL
Allow all switch types, enable the 'Clear' button.
lvgl.SW_SWITCH
Switches
lvgl.SW_TRIM
Trims
lvgl.SW_LOGICAL_SWITCH
Logical switches
lvgl.SW_FLIGHT_MODE
Flight modes
lvgl.SW_TELEM
Telemetry sensors
lvgl.SW_OTHER
ON, ONE, trainer connected, radio activity, etc
lvgl.SW_CLEAR
Special value to control the 'Clear' button in the switch chooser.
Constants to control scrolling of containers such as box and rectangle
lvgl.SCROLL_OFF
No scrolling allowed. Objects outside the containers boundary will be clipped
lvgl.SCROLL_HOR
Horizontal scrolling only
lvgl.SCROLL_VER
Vertical scrolling only
lvgl.SCROLL_ALL
Both horizontal and vertical scrolling allowed
Constants for managing page layout (see the API section for more details). Added in 2.11.4.
lvgl.PAGE_BODY_HEIGHT
Height of the body section for a 'page' object.
lvgl.UI_ELEMENT_HEIGHT
Default height for controls (buttons, toggle, etc)
lvgl.LCD_SCALE
Scale factor for the LCD display compared to the standard 480x272 size display. Standard displays with LCD sizes 480x272, 480x320 and 320x480 have a scaling factor of 1.0. Radios with a 320x240 LCD have a scaling factor of 0.8. Radios with a 800x480 LCD have a scaling factor of 1.375.
lvgl.PERCENT_SIZE
Used to create percentage based position and size values for objects., based on the size of the parent container. To use a percentage size set the desired property to lvgl.PERCENT_SIZE + N, where N is the percentage value from 1 to 100. E.G. w=lvgl.PERCENT_SIZE + 50.
Object creation constants (when using the 'build' function). Added in 2.11.4.
As an alternative to sepcifying the type for an object by name the following contants may be used.
lvgl.LABEL
"label"
lvgl.RECTANGLE
"rectangle"
lvgl.CIRCLE
"circle"
lvgl.ARC
"arc"
lvgl.HLINE
"hline"
lvgl.VLINE
"vline"
lvgl.LINE
"line"
lvgl.TRIANGLE
"triangle"
lvgl.IMAGE
"image"
lvgl.QRCODE
"qrcode"
lvgl.BOX
"box"
lvgl.BUTTON
"button"
lvgl.MOMENTARY_BUTTON
"momentaryButton"
lvgl.TOGGLE
"toggle"
lvgl.TEXT_EDIT
"textEdit"
lvgl.NUMBER_EDIT
"numbeEdit"
lvgl.CHOICE
"choice"
lvgl.SLIDER
"slider"
lvgl.VERTICAL_SLIDER
"verticalSlider"
lvgl.PAGE
"page"
lvgl.FONT
"font"
lvgl.ALIGN
"align"
lvgl.COLOR
"color"
lvgl.TIMER
"timer"
lvgl.SWITCH
"switch"
lvgl.SOURCE
"source"
lvgl.FILE
"file"
lvgl.SETTING
"setting"
Last updated
Was this helpful?