Span Group (lv_spangroup)

Rich text built from spans, each with its own font, color and size.

Overview

The Span Group displays rich text built from multiple spans, each with its own text, font, color and size. Spans can be added or removed at runtime.

Learn more in the LVGL Open documentation.

Enumerations

lv_span_overflow — How to handle overflowing text

ValueDescription
clipClip at boundary
ellipsisReplace overflowing words with ...

Properties

Parts

Style parts of the widget with local style (e.g. style_bg_color-knob="0xff0000") or with style sheets (e.g. <style name="style_knob" selector="knob">). See Styles to learn more.

PartDescription
mainStyle the text block and its background: text and background properties. Style individual spans via each span's own style.

Properties below are the widget's XML <api>; see API for how properties, parameters and elements work.

PropertyTypeDescription
overflowenum:lv_span_overflowSet overflow mode
max_linesintSet max lines
indentintSet first line indent (px)

<lv_spangroup-span>

Add a styled text span

access add · returns lv_span

NameKindTypeDescription
textpropstringSet span text
stylepropstyleSet span style
bind_textpropsubjectBind text to a subject
bind_text-fmtpropstringFormat string (printf style) (default: NULL)

Last updated on

On this page