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
| Value | Description |
|---|---|
merge_right | Merge with right cell |
text_crop | Crop text if too long |
custom_1 | User flag 1 |
custom_2 | User flag 2 |
custom_3 | User flag 3 |
custom_4 | User 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.
| Part | Description |
|---|---|
main | The table's outer frame and background: background, border and padding properties. |
items | The cells: background and text properties, applied uniformly to all cells. Per-cell variations need cell ctrl flags or draw events. |
scrollbar | The 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.
| Property | Type | Description |
|---|---|---|
row_count | int | Set row count |
column_count | int | Set column count |
<lv_table-column>
Configure a table column
access set
| Name | Kind | Type | Description |
|---|---|---|---|
column | arg | int | Column index (0-based) |
width | prop | px | Set column width |
<lv_table-cell>
Configure a table cell
access set
| Name | Kind | Type | Description |
|---|---|---|---|
row | arg | int | Row index (0-based) |
column | arg | int | Column index (0-based) |
value | prop | string | Set cell text |
ctrl | prop | enum:lv_table_cell_ctrl+ | Set cell flags |
Last updated on