Skip to content

lvgl.rectangle

Syntax

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

parent:rectangle({settings})

Parameters

See the API page for parameter description and common settings.

Rectangle are based on the 'lvgl.box' object so all of the settings from 'lvgl.box' also apply.

Rectangle specific settings:

NameTypeDescriptionDefault if not set
thicknessNumberSets the width of the line used to draw the border.1
filledBoolean or FunctionIf true the rectangle is filled with the 'color' value.

Filled can be a function in 2.11.4 or later.
false
roundedNumberIf greater than 0 makes the corners rounded with a radius set this value.
When set to a value greater than 0, must also be >= thickness.
0
opacityNumber or FunctionSets the opacity.
Note: range is 0 (transparent) to 255 (opaque)
255 (opaque)

Notes

When used in a stand alone tool script, the rectangle will automatically add scroll bars if any child objects are placed outside of the rectangle boundaries. For widgtes, child objects outside the rectangle bounds will be clipped.

Return values

LVGL object

API Status

AvailStatusComment
BW radiosfalse
Color radiostrueactive

Change log

EdgeTX versionChange
2.11.0Introduced