Skip to content

form.addStaticText

since 1.1.0

Add a static text to the current form.

form.addStaticText(line, rect, text)

Parameters

Name Type Required Description
line FormLine yes the line where the text should be added
rect Rect yes the coordinates
text string yes the displayed text

Returns

Nothing.

Examples

local line = form.addLine("Firmware")
form.addStaticText(line, nil, system.getVersion().version)
From the official Ethos documentation
form.addStaticText(line, nil, "Static Text")

Used in

Real-world usage

Called 219 times across 10 open-source Ethos Lua projects. A few short excerpts:
form.addStaticText(line, nil, row.value)

src/rfsuite/app/modules/developer/tools/api_tester.lua:333

previewTop = form.addStaticText(layoutLine, slots[2], "")

src/rfsuite/app/pages/settings_activelook_mode.lua:41

local enaLive = form.addStaticText(enaLine, {x = xLive, y = y, w = wLive, h = h}, "--")

src/wfsuite/app/pages/adjustments.lua:727