Table (lv_table)

Lightweight rows, columns and cells of text drawn on the fly.

Overview

The Table displays text in rows, columns and cells. Only the cell text is stored and cells are drawn on the fly, so large tables stay lightweight. Cell selection via keyboard or encoder is supported.

Learn more in the LVGL Open documentation.

Enumerations

lv_table_cell_ctrl — Cell control flags

ValueDescription
merge_rightMerge with right cell
text_cropCrop text if too long
custom_1User flag 1
custom_2User flag 2
custom_3User flag 3
custom_4User flag 4

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
mainThe table's outer frame and background: background, border and padding properties.
itemsThe cells: background and text properties, applied uniformly to all cells. Per-cell variations need cell ctrl flags or draw events.
scrollbarThe scrollbar shown when the table is larger than its area: width (thickness), background properties and padding.

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

PropertyTypeDescription
row_countintSet row count
column_countintSet column count

<lv_table-column>

Configure a table column

access set

NameKindTypeDescription
columnargintColumn index (0-based)
widthproppxSet column width

<lv_table-cell>

Configure a table cell

access set

NameKindTypeDescription
rowargintRow index (0-based)
columnargintColumn index (0-based)
valuepropstringSet cell text
ctrlpropenum:lv_table_cell_ctrl+Set cell flags

Last updated on

On this page