Skip to content

lvgl.textEdit

lvgl.textEdit([parent, ]params)

Add a text edit box using the EdgeTX style.

Parameters

NameReqTypeDescription
parentnoobjectoptional LVGL object to attach the new object to; if omitted the object is created in the top-level script window
paramsyestable
FieldTypeDescription
xnumberposition relative to the top-left of the parent
ynumberposition relative to the top-left of the parent
wnumberwidth
hnumberheight
colorcolor or functionprimary color for the object
posfunctiondynamic position callback returning x, y
sizefunctiondynamic size callback returning w, h
visiblefunctiondynamic visibility callback
floatingbooleankeep the object fixed inside a scrollable container, added in 2.11.6, defaults to false
valuestring or functiontext to edit; if a function, the text can be changed by both script and user, defaults to an empty string
lengthnumbermaximum editable text length, 1 to 128, defaults to 32
setfunctioncalled when the user edits the text; passed the new string content, defaults to nil
activefunctionsets the enabled/disabled state; must return a boolean, true to enable, defaults to nil

Returns

Name Type Description
- table LVGL object, or nil if not running as a One-Time script or fullscreen widget

Availability

  • Since: 2.11.0
  • Radio support: color-lcd

Notes

  • Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.

Source

radio/src/lua/api_colorlcd_lvgl.cpp