{"id":15773,"date":"2024-12-12T06:50:11","date_gmt":"2024-12-12T06:50:11","guid":{"rendered":"https:\/\/www.qec.tw\/?p=15773"},"modified":"2024-12-12T06:51:56","modified_gmt":"2024-12-12T06:51:56","slug":"table","status":"publish","type":"post","link":"https:\/\/www.qec.tw\/zh\/86duino\/86hmi\/table\/","title":{"rendered":"86HMI::Table"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">[Visualization widgets]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Object Functions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Table object.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"578\" height=\"325\" src=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-36.png\" alt=\"table-1\" class=\"wp-image-15774\" srcset=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-36.png 578w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-36-300x169.png 300w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-36-18x10.png 18w\" sizes=\"(max-width: 578px) 100vw, 578px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Table Properties.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"236\" height=\"525\" src=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-37.png\" alt=\"table-2\" class=\"wp-image-15775\" srcset=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-37.png 236w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-37-135x300.png 135w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-37-5x12.png 5w\" sizes=\"(max-width: 236px) 100vw, 236px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Identifier:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ID: Unique number that identifies the object.<\/li>\n\n\n\n<li>Name: User-definable name for the object. It can be used with 86HMI API.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Geometry:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>X: Object X coordinate.<\/li>\n\n\n\n<li>Y: Object Y coordinate.<\/li>\n\n\n\n<li>Width: Object width.<\/li>\n\n\n\n<li>Height: Object height.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Table Size:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Row: Set the number of rows of the Table object, up to a maximum of 64 rows.<\/li>\n\n\n\n<li>Column: Set the number of columns of the Table object, up to a maximum of 11 columns.<\/li>\n\n\n\n<li>Col0~n Width: Columns width. The grid number will depend on the column number.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>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.<\/li>\n\n\n\n<li>Cell Color: Cell color. It can be chosen through the color palette or by directly inputting the color code.<\/li>\n\n\n\n<li>Cell TextColor: Cell text color. It can be chosen through the color palette or by directly inputting the color code.<\/li>\n\n\n\n<li>Cell TextAlign: Cell text-align, left\/center\/right.<\/li>\n\n\n\n<li>Cell Border: Cell border setting, only display the vertical\/horizontal lines, or choose to display both vertical\/horizontal lines.<\/li>\n\n\n\n<li>Line Spacing: Table row line space (based on the vertical center of the text, with equal spacing between top and bottom).<\/li>\n\n\n\n<li>TextFont: Choose from 6 default font styles. For font configuration instructions, please refer to Theme Management.<\/li>\n\n\n\n<li>Background: Table background displayed or not.<\/li>\n\n\n\n<li>Opacity: Table object opacity ratio.<\/li>\n\n\n\n<li>Order: Object order. It can adjust the object order by up\/down, which can be viewed on the Object List.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Additional Information:<\/strong><br>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).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"236\" height=\"332\" src=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-38.png\" alt=\"table-3\" class=\"wp-image-15776\" srcset=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-38.png 236w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-38-213x300.png 213w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-38-9x12.png 9w\" sizes=\"(max-width: 236px) 100vw, 236px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"575\" height=\"325\" src=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-40.png\" alt=\"table-4\" class=\"wp-image-15778\" srcset=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-40.png 575w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-40-300x170.png 300w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-40-18x10.png 18w\" sizes=\"(max-width: 575px) 100vw, 575px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>R.H Color: Row Header color. It can be chosen through the color palette or by directly inputting the color code.<\/li>\n\n\n\n<li>R.H TextColor: Row Header Text color. It can be chosen through the color palette or by directly inputting the color code.<\/li>\n\n\n\n<li>R.H TextAlign: Row Header text-align, left\/center\/right.<\/li>\n\n\n\n<li>R.H Text: Row Header content. It can input the content in a drop-down menu.<\/li>\n\n\n\n<li>C.H Color: Column Header color. It can be chosen through the color palette or by directly inputting the color code.<\/li>\n\n\n\n<li>C.H TextColor: Column Header Text color. It can be chosen through the color palette or by directly inputting the color code.<\/li>\n\n\n\n<li>C.H TextAlign: Column Header text-align, left\/center\/right.<\/li>\n\n\n\n<li>C.H Text: Column Header content. It can input the content in a drop-down menu.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"851\" height=\"372\" src=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-41.png\" alt=\"table-5\" class=\"wp-image-15779\" srcset=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-41.png 851w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-41-300x131.png 300w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-41-768x336.png 768w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-41-18x8.png 18w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-41-600x262.png 600w\" sizes=\"(max-width: 851px) 100vw, 851px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"859\" height=\"383\" src=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-42.png\" alt=\"table-6\" class=\"wp-image-15780\" srcset=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-42.png 859w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-42-300x134.png 300w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-42-768x342.png 768w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-42-18x8.png 18w, https:\/\/www.qec.tw\/wp-content\/uploads\/2024\/12\/image-42-600x268.png 600w\" sizes=\"(max-width: 859px) 100vw, 859px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">API Functions<\/h2>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">setTableCellText()<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Description<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Set Table Cell text.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Syntax<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>void setTableCellText(lv_obj_t* id, int x, int y, const char* value);<br>void setTableCellText(char* name, int x, int y, const char* value);<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Parameters<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[in] id<\/code><br>Object ID.<\/li>\n\n\n\n<li><code>[in] name<\/code><br>Object Name.<\/li>\n\n\n\n<li><code>[in] x<\/code><br>Table row.<\/li>\n\n\n\n<li><code>[in] y<\/code><br>Table column.<\/li>\n\n\n\n<li><code>[in] value<\/code><br>Table Cell text.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Return<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">None.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>#include &quot;myhmi.h&quot;\n\nvoid setup() {\n  Hmi.begin();\n  \/\/ ...\n  Hmi.setTableCellText(p1tbl1, 0, 0, &quot;First row&quot;);\n}\n\nvoid loop() {\n  \/\/ ...\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">setTableCellValue()<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Description<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Set Table Cell value.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Syntax<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>void setTableCellValue(lv_obj_t* id, int x, int y, int value);<br>void setTableCellValue(char* name, int x, int y, int value);<br>void setTableCellValue(lv_obj_t* id, int x, int y, double value);<br>void setTableCellValue(char* name, int x, int y, double value);<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Parameters<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[in] id<\/code><br>Object ID.<\/li>\n\n\n\n<li><code>[in] name<\/code><br>Object Name.<\/li>\n\n\n\n<li><code>[in] x<\/code><br>Table row.<\/li>\n\n\n\n<li><code>[in] y<\/code><br>Table column.<\/li>\n\n\n\n<li><code>[in] value<\/code><br>Table Cell value.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Return<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">None.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>#include &quot;myhmi.h&quot;\n\nvoid setup() {\n  Hmi.begin();\n  \/\/ ...\n  Hmi.setTableCellValue(p1tbl1, 0, 0, 100);\n}\nvoid loop() {\n  \/\/ ...\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">setTableAlign()<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Description<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Set Table Text Align Parameters, with options as Left\/Center\/Right.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Syntax<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>void setTableAlign(lv_obj_t* id, int x, int y, lv_label_align_t align);<br>void setTableAlign(char* name, int x, int y, lv_label_align_t align);<br>void setTableAlign(lv_obj_t* id, int x1, int y1, int x2, int y2, lv_label_align_t align);<br>void setTableAlign(char* name, int x1, int y1, int x2, int y2, lv_label_align_t align);<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Parameters<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[in] id<\/code><br>Object ID.<\/li>\n\n\n\n<li><code>[in] name<\/code><br>Object Name.<\/li>\n\n\n\n<li><code>[in] x<\/code><br>Table row.<\/li>\n\n\n\n<li><code>[in] y<\/code><br>Table column.<\/li>\n\n\n\n<li><code>[in] x1<\/code><br>Table start row.<\/li>\n\n\n\n<li><code>[in] y1<\/code><br>Table start column.<\/li>\n\n\n\n<li><code>[in] x2<\/code><br>Table end row.<\/li>\n\n\n\n<li><code>[in] y2<\/code><br>Table end column.<\/li>\n\n\n\n<li><code>[in] align<\/code><br>Table Align Parameters. (LV_LABEL_ALIGN_LEFT\/CENTER\/RIGHT)<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Return<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">None.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>#include &quot;myhmi.h&quot;\n\nvoid setup() {\n  Hmi.begin();\n  \/\/ ...\n  Hmi.setTableAlign(p1tbl1, 0, 0, LV_LABEL_ALIGN_CENTER);\n}\n\nvoid loop() {\n  \/\/ ...\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">setTableRowAlign()<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Description<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Set Table Row Align Parameters, with options as Left\/Center\/Right.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Syntax<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>void setTableRowAlign(lv_obj_t* id, int row, lv_label_align_t align);<br>void setTableRowAlign(char* name, int row, lv_label_align_t align);<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Parameters<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[in] id<\/code><br>Object ID.<\/li>\n\n\n\n<li><code>[in] name<\/code><br>Object Name.<\/li>\n\n\n\n<li><code>[in] row<\/code><br>Table Row.<\/li>\n\n\n\n<li><code>[in] align<\/code><br>Table row Align Parameters.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Return<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">None.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>#include &quot;myhmi.h&quot;\n\nvoid setup() {\n  Hmi.begin();\n  \/\/ ...\n  Hmi.setTableRowAlign(p1tbl1, 0, LV_LABEL_ALIGN_CENTER);\n}\n\nvoid loop() {\n  \/\/ ...\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">setTableColAlign()<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Description<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Set Table Column Align Parameters, with options as Left\/Center\/Right.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Syntax<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>void setTableColAlign(lv_obj_t* id, int col, lv_label_align_t align);<br>void setTableColAlign(char* name, int col, lv_label_align_t align);<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Parameters<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[in] id<\/code><br>Object ID.<\/li>\n\n\n\n<li><code>[in] name<\/code><br>Object Name.<\/li>\n\n\n\n<li><code>[in] col<\/code><br>Table Column.<\/li>\n\n\n\n<li><code>[in] align<\/code><br>Table Column Align Parameters.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Return<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">None.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>#include &quot;myhmi.h&quot;\n\nvoid setup() {\n  Hmi.begin();\n  \/\/ ...\n  Hmi.setTableColAlign(p1tbl1, 0, LV_LABEL_ALIGN_CENTER);\n}\n\nvoid loop() {\n  \/\/ ...\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">setTableCellStyle()<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Description<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Set Table Cell Style.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Syntax<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>void setTableCellStyle(lv_obj_t* id, int x, int y, int part);<br>void setTableCellStyle(char* name, int x, int y, int part);<br>void setTableCellStyle(lv_obj_t* id, int x1, int y1, int x2, int y2, int part);<br>void setTableCellStyle(char* name, int x1, int y1, int x2, int y2, int part);<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Parameters<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[in] id<\/code><br>Object ID.<\/li>\n\n\n\n<li><code>[in] name<\/code><br>Object Name.<\/li>\n\n\n\n<li><code>[in] x<\/code><br>Table row.<\/li>\n\n\n\n<li><code>[in] y<\/code><br>Table Column.<\/li>\n\n\n\n<li><code>[in] x1<\/code><br>Table start row.<\/li>\n\n\n\n<li><code>[in] y1<\/code><br>Table start column.<\/li>\n\n\n\n<li><code>[in] x2<\/code><br>Table end row.<\/li>\n\n\n\n<li><code>[in] y2<\/code><br>Table end column.<\/li>\n\n\n\n<li><code>[in] part<\/code><br>Table Style. Please refer to <a href=\"https:\/\/docs.lvgl.io\/7.11\/widgets\/table.html\" target=\"_blank\" rel=\"noopener\">Table (lv_table) \u2014 LVGL documentation<\/a> for details.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Return<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">None.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>#include &quot;myhmi.h&quot;\n\nvoid setup() {\n  Hmi.begin();\n  \/\/ ...\n  Hmi.setTableCellStyle(p1tbl1, 0, 0, LV_TABLE_PART_CELL1);\n}\n\nvoid loop() {\n  \/\/ ...\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">setTableRowStyle()<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Description<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Set Table Row Style.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Syntax<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>void setTableRowStyle(lv_obj_t* id, int row, int part);<br>void setTableRowStyle(char* name, int row, int part);<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Parameters<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[in] id<\/code><br>Object ID.<\/li>\n\n\n\n<li><code>[in] name<\/code><br>Object Name.<\/li>\n\n\n\n<li><code>[in] row<\/code><br>Table row.<\/li>\n\n\n\n<li><code>[in] part<\/code><br>Table Style. Please refer to <a href=\"https:\/\/docs.lvgl.io\/7.11\/widgets\/table.html\" target=\"_blank\" rel=\"noopener\">Table (lv_table) \u2014 LVGL documentation<\/a> for details.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Return<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">None.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>#include &quot;myhmi.h&quot;\n\nvoid setup() {\n  Hmi.begin();\n  \/\/ ...\n  Hmi.setTableRowStyle(p1tbl1, 0, LV_TABLE_PART_CELL1);\n}\n\nvoid loop() {\n  \/\/ ...\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">setTableColStyle()<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Description<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Set Table Column Style.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Syntax<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>void setTableColStyle(lv_obj_t* id, int col, int part);<br>void setTableColStyle(char* name, int col, int part);<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Parameters<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[in] id<\/code><br>Object ID.<\/li>\n\n\n\n<li><code>[in] name<\/code><br>Object Name.<\/li>\n\n\n\n<li><code>[in] col<\/code><br>Table Column.<\/li>\n\n\n\n<li><code>[in] part<\/code><br>Table Style. Please refer to <a href=\"https:\/\/docs.lvgl.io\/7.11\/widgets\/table.html\" target=\"_blank\" rel=\"noopener\">Table (lv_table) \u2014 LVGL documentation<\/a> for details.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Return<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">None.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>#include &quot;myhmi.h&quot;\n\nvoid setup() {\n  Hmi.begin();\n  \/\/ ...\n  Hmi.setTableColStyle(p1tbl1, 0, LV_TABLE_PART_CELL1);\n}\n\nvoid loop() {\n  \/\/ ...\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">setTableStyleTextColor()<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Description<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Set Table-style text color.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Syntax<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>void setTableStyleTextColor(lv_obj_t* id, int part, uint32_t color);<br>void setTableStyleTextColor(char* name, int part, uint32_t color);<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Parameters<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[in] id<\/code><br>Object ID.<\/li>\n\n\n\n<li><code>[in] name<\/code><br>Object Name.<\/li>\n\n\n\n<li><code>[in] part<\/code><br>Table Style. Please refer to <a href=\"https:\/\/docs.lvgl.io\/7.11\/widgets\/table.html\" target=\"_blank\" rel=\"noopener\">Table (lv_table) \u2014 LVGL documentation<\/a> for details.<\/li>\n\n\n\n<li><code>[in] color<\/code><br>Table text color. It can be chosen through the color palette or by directly inputting the color code.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Return<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">None.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>#include &quot;myhmi.h&quot;\n\nvoid setup() {\n  Hmi.begin();\n  \/\/ ...\n  Hmi.setTableStyleTextColor(p1tbl1, LV_TABLE_PART_CELL1, 0x000000);\n}\n\nvoid loop() {\n  \/\/ ...\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">setTableStyleBgColor()<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Description<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Set Table Style background color.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Syntax<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>void setTableStyleBgColor(lv_obj_t* id, int part, uint32_t color);<br>void setTableStyleBgColor(char* name, int part, uint32_t color);<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Parameters<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[in] id<\/code><br>Object ID.<\/li>\n\n\n\n<li><code>[in] name<\/code><br>Object Name.<\/li>\n\n\n\n<li><code>[in] part<\/code><br>Table Style. Please refer to <a href=\"https:\/\/docs.lvgl.io\/7.11\/widgets\/table.html\" target=\"_blank\" rel=\"noopener\">Table (lv_table) \u2014 LVGL documentation<\/a> for details.<\/li>\n\n\n\n<li><code>[in] color<\/code><br>Table background color. It can be chosen through the color palette or by directly inputting the color code.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Return<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">None.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>#include &quot;myhmi.h&quot;\n\nvoid setup() {\n  Hmi.begin();\n  \/\/ ...\n  Hmi.setTableStyleBgColor(p1tbl1, LV_TABLE_PART_CELL1, 0xFFFFFF);\n}\n\nvoid loop() {\n  \/\/ ...\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Please see the&nbsp;<a href=\"https:\/\/www.qec.tw\/86duino\/86hmi\/\">86HMI Editor User Manual<\/a>&nbsp;for more instructions on 86HMI widgets and API usage.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[Visualization widgets] Object Functions Table object. Table Properties. Identifier: Geometry: Table Size: Options: Additional Information:If you set the Hearder of Table to be displayed, there [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":15781,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[285],"tags":[162],"class_list":["post-15773","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-86hmi","tag-86duino"],"_links":{"self":[{"href":"https:\/\/www.qec.tw\/zh\/wp-json\/wp\/v2\/posts\/15773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qec.tw\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qec.tw\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qec.tw\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qec.tw\/zh\/wp-json\/wp\/v2\/comments?post=15773"}],"version-history":[{"count":0,"href":"https:\/\/www.qec.tw\/zh\/wp-json\/wp\/v2\/posts\/15773\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.qec.tw\/zh\/wp-json\/wp\/v2\/media\/15781"}],"wp:attachment":[{"href":"https:\/\/www.qec.tw\/zh\/wp-json\/wp\/v2\/media?parent=15773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qec.tw\/zh\/wp-json\/wp\/v2\/categories?post=15773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qec.tw\/zh\/wp-json\/wp\/v2\/tags?post=15773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}