Skip to content

lvgl.file

Syntax

lvgl.file([parent], {settings})

parent:file({settings})

Parameters

See the API page for parameter description and common settings.

Choice specific settings:

NameTypeDescriptionDefault if not set
titleStringText to be displayed in the header of the popup menu.Empty string
getFunctionCalled to get the name of the currently selected file, when the popup menu is first opened.
Must return a string.
nil
setFunctionCalled when the user taps on a file name.
The function is passed the file name selected (does not include file path).
nil
activeFunctionSet the enabled / disabled state. Return value must be a boolean - true to enable the control, false to disable.nil
folderStringFolder on SD card to browse for files,nil
extensionStringFilter for extension matching.
Concatenate desired extensions into a single string.
E.G. ".png" will match only PNG image files. ".png.bmp" will match both PNG and BMP images.
nil
hideExtensionBooleanHide the file extension in the picker list.
If true the file extension is not included in when the 'set' function is called.
false
maxLenNumberLimits the maximum file name length. If set, files with longer names are not shown in the picker list.255

Return values

LVGL object

Notes

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.

API Status

AvailStatusComment
BW radiosfalse
Color radiostrueactiveOnly available for One-Time scripts and widgets running in full screen mode.

Change log

EdgeTX versionChange
2.11.0Introduced