lvgl.page

Create a page layout for a One-Time script using EdgeTX styling. The page layout has a menu bar at the top with title and sub-title lines as well as a 'back' button in the top left corner.

Syntax

lvgl.page({settings})

Parameters

The lvgl.page function uses only the settings shown below. The common settings shown on the API page are not used.

Name
Type
Description
Default

title

String

Text to be displayed as the title in the header of the page.

Empty string

subtitle

String

Text to be displayed as the sub-title in the header of the page.

Empty string

icon

String

Full path to an image file on the SD card to be displayed as the icon in the 'back' button (top left corner). If not set then the EdgeTX logo icon is used. The icon file is a mask image and should be 30x30 pixels in size and be a grey-scale image. White pixels are transparent and black pixels are fully opaque.

Empty string

back

Function

Called when the user taps the 'back' button in the top left corner.

nil

flexFlow

Flow type - lvgl.FLOW_COLUMN or lvgl.FLOW_ROW

Enable flex layout for this page.

not used

flexPad

Number

When flex layout is used, set the padding between rows or columns. Recommended to use the lvgl.PAD_xxx values.

0

scrollBar

Boolean

Sets the allowed scrolling directions if child objects extend beyond the box boundaries. Only valid for stand alone scripts.

true

scrollDir

Scroll type - lvgl.SCROLL_xx

Sets the allowed scrolling directions if child objects extend beyond the page boundaries. Only valid for stand alone scripts.

lvgl.SCROLL_ALL

scrolled

Function

Called when the box content is scrolled. Passed two parameters 'x', and 'y' which are the current scroll position of the box window.

nil

scrollTo

Function

Function to override the box scroll position. Must return two values, 'x' and 'y' which are the position to scroll the box window to.

nil

Return values

LVGL object

Notes

The 'page' object should be created as the top level LVGL object in the script window, and all other LVGL objects added as children of the 'page' object.

The page will automatically add scroll bars if any child objects are placed outside of the page boundaries.

API Status

Avail
Status
Comment

BW radios

Color radios

active

Only available for One-Time scripts and widgets running in full screen mode.

Change log

EdgeTX version
Change

2.11.0

Introduced

Last updated

Was this helpful?