[Visualization widgets]
Object Functions
Table object.

Table Properties.

Identifier:
- ID: Unique number that identifies the object.
- Name: User-definable name for the object. It can be used with 86HMI API.
Geometry:
- X: Object X coordinate.
- Y: Object Y coordinate.
- Width: Object width.
- Height: Object height.
Table Size:
- Row: Set the number of rows of the Table object, up to a maximum of 64 rows.
- Column: Set the number of columns of the Table object, up to a maximum of 11 columns.
- Col0~n Width: Columns width. The grid number will depend on the column number.
Options:
- Header: Table header, with the options as no display, horizontal, vertical, or both. It can fill colors and can be chosen through the color palette or by directly inputting the color code.
- Cell Color: Cell color. It can be chosen through the color palette or by directly inputting the color code.
- Cell TextColor: Cell text color. It can be chosen through the color palette or by directly inputting the color code.
- Cell TextAlign: Cell text-align, left/center/right.
- Cell Border: Cell border setting, only display the vertical/horizontal lines, or choose to display both vertical/horizontal lines.
- Line Spacing: Table row line space (based on the vertical center of the text, with equal spacing between top and bottom).
- TextFont: Choose from 6 default font styles. For font configuration instructions, please refer to Theme Management.
- Background: Table background displayed or not.
- Opacity: Table object opacity ratio.
- Order: Object order. It can adjust the object order by up/down, which can be viewed on the Object List.
Additional Information:
If you set the Hearder of Table to be displayed, there will be a Header attribute option. The following is an example of Both (both horizontal and vertical table headers).


- R.H Color: Row Header color. It can be chosen through the color palette or by directly inputting the color code.
- R.H TextColor: Row Header Text color. It can be chosen through the color palette or by directly inputting the color code.
- R.H TextAlign: Row Header text-align, left/center/right.
- R.H Text: Row Header content. It can input the content in a drop-down menu.
- C.H Color: Column Header color. It can be chosen through the color palette or by directly inputting the color code.
- C.H TextColor: Column Header Text color. It can be chosen through the color palette or by directly inputting the color code.
- C.H TextAlign: Column Header text-align, left/center/right.
- C.H Text: Column Header content. It can input the content in a drop-down menu.


API Functions
setTableCellText()
Description
Set Table Cell text.
Syntax
void setTableCellText(lv_obj_t* id, int x, int y, const char* value);
void setTableCellText(char* name, int x, int y, const char* value);
Parameters
[in] id
Object ID.[in] name
Object Name.[in] x
Table row.[in] y
Table column.[in] value
Table Cell text.
Return
None.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... Hmi.setTableCellText(p1tbl1, 0, 0, "First row"); } void loop() { // ... }
setTableCellValue()
Description
Set Table Cell value.
Syntax
void setTableCellValue(lv_obj_t* id, int x, int y, int value);
void setTableCellValue(char* name, int x, int y, int value);
void setTableCellValue(lv_obj_t* id, int x, int y, double value);
void setTableCellValue(char* name, int x, int y, double value);
Parameters
[in] id
Object ID.[in] name
Object Name.[in] x
Table row.[in] y
Table column.[in] value
Table Cell value.
Return
None.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... Hmi.setTableCellValue(p1tbl1, 0, 0, 100); } void loop() { // ... }
setTableAlign()
Description
Set Table Text Align Parameters, with options as Left/Center/Right.
Syntax
void setTableAlign(lv_obj_t* id, int x, int y, lv_label_align_t align);
void setTableAlign(char* name, int x, int y, lv_label_align_t align);
void setTableAlign(lv_obj_t* id, int x1, int y1, int x2, int y2, lv_label_align_t align);
void setTableAlign(char* name, int x1, int y1, int x2, int y2, lv_label_align_t align);
Parameters
[in] id
Object ID.[in] name
Object Name.[in] x
Table row.[in] y
Table column.[in] x1
Table start row.[in] y1
Table start column.[in] x2
Table end row.[in] y2
Table end column.[in] align
Table Align Parameters. (LV_LABEL_ALIGN_LEFT/CENTER/RIGHT)
Return
None.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... Hmi.setTableAlign(p1tbl1, 0, 0, LV_LABEL_ALIGN_CENTER); } void loop() { // ... }
setTableRowAlign()
Description
Set Table Row Align Parameters, with options as Left/Center/Right.
Syntax
void setTableRowAlign(lv_obj_t* id, int row, lv_label_align_t align);
void setTableRowAlign(char* name, int row, lv_label_align_t align);
Parameters
[in] id
Object ID.[in] name
Object Name.[in] row
Table Row.[in] align
Table row Align Parameters.
Return
None.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... Hmi.setTableRowAlign(p1tbl1, 0, LV_LABEL_ALIGN_CENTER); } void loop() { // ... }
setTableColAlign()
Description
Set Table Column Align Parameters, with options as Left/Center/Right.
Syntax
void setTableColAlign(lv_obj_t* id, int col, lv_label_align_t align);
void setTableColAlign(char* name, int col, lv_label_align_t align);
Parameters
[in] id
Object ID.[in] name
Object Name.[in] col
Table Column.[in] align
Table Column Align Parameters.
Return
None.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... Hmi.setTableColAlign(p1tbl1, 0, LV_LABEL_ALIGN_CENTER); } void loop() { // ... }
setTableCellStyle()
Description
Set Table Cell Style.
Syntax
void setTableCellStyle(lv_obj_t* id, int x, int y, int part);
void setTableCellStyle(char* name, int x, int y, int part);
void setTableCellStyle(lv_obj_t* id, int x1, int y1, int x2, int y2, int part);
void setTableCellStyle(char* name, int x1, int y1, int x2, int y2, int part);
Parameters
[in] id
Object ID.[in] name
Object Name.[in] x
Table row.[in] y
Table Column.[in] x1
Table start row.[in] y1
Table start column.[in] x2
Table end row.[in] y2
Table end column.[in] part
Table Style. Please refer to Table (lv_table) — LVGL documentation for details.
Return
None.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... Hmi.setTableCellStyle(p1tbl1, 0, 0, LV_TABLE_PART_CELL1); } void loop() { // ... }
setTableRowStyle()
Description
Set Table Row Style.
Syntax
void setTableRowStyle(lv_obj_t* id, int row, int part);
void setTableRowStyle(char* name, int row, int part);
Parameters
[in] id
Object ID.[in] name
Object Name.[in] row
Table row.[in] part
Table Style. Please refer to Table (lv_table) — LVGL documentation for details.
Return
None.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... Hmi.setTableRowStyle(p1tbl1, 0, LV_TABLE_PART_CELL1); } void loop() { // ... }
setTableColStyle()
Description
Set Table Column Style.
Syntax
void setTableColStyle(lv_obj_t* id, int col, int part);
void setTableColStyle(char* name, int col, int part);
Parameters
[in] id
Object ID.[in] name
Object Name.[in] col
Table Column.[in] part
Table Style. Please refer to Table (lv_table) — LVGL documentation for details.
Return
None.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... Hmi.setTableColStyle(p1tbl1, 0, LV_TABLE_PART_CELL1); } void loop() { // ... }
setTableStyleTextColor()
Description
Set Table-style text color.
Syntax
void setTableStyleTextColor(lv_obj_t* id, int part, uint32_t color);
void setTableStyleTextColor(char* name, int part, uint32_t color);
Parameters
[in] id
Object ID.[in] name
Object Name.[in] part
Table Style. Please refer to Table (lv_table) — LVGL documentation for details.[in] color
Table text color. It can be chosen through the color palette or by directly inputting the color code.
Return
None.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... Hmi.setTableStyleTextColor(p1tbl1, LV_TABLE_PART_CELL1, 0x000000); } void loop() { // ... }
setTableStyleBgColor()
Description
Set Table Style background color.
Syntax
void setTableStyleBgColor(lv_obj_t* id, int part, uint32_t color);
void setTableStyleBgColor(char* name, int part, uint32_t color);
Parameters
[in] id
Object ID.[in] name
Object Name.[in] part
Table Style. Please refer to Table (lv_table) — LVGL documentation for details.[in] color
Table background color. It can be chosen through the color palette or by directly inputting the color code.
Return
None.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... Hmi.setTableStyleBgColor(p1tbl1, LV_TABLE_PART_CELL1, 0xFFFFFF); } void loop() { // ... }
Please see the 86HMI Editor User Manual for more instructions on 86HMI widgets and API usage.