Skip to content

lvgl.hline

lvgl.hline([parent, ]params)

Display a horizontal line.

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
roundedbooleanif true the line's end caps are rounded, defaults to false
opacitynumber or functionopacity from 0 (transparent) to 255 (opaque), defaults to 255
dashGapnumbergap size for dashed lines, defaults to 0
dashWidthnumberdash size for dashed lines, defaults to 0; both dashGap and dashWidth must be > 0 to draw dashed lines

Returns

Name Type Description
- table LVGL object

Availability

  • Since: 2.11.0
  • Radio support: color-lcd

Source

radio/src/lua/api_colorlcd_lvgl.cpp