The 4 Table style means what?

I read the doc about table, it refer the 4 cell types, but what does the cell type 1/2/3/4 mean?

https://docs.littlevgl.com/en/html/object-types/table.html#cell-type

1 Like

we can set different type for the 4 types, is it right? I can set the celltype1 for table header, also can set the celltype2 for the table header, it depends on coder. I think it provides us 4 cell types to initial, we can decide each type details, is it right?

You can set any cell to the type as you wish by

lv_table_set_cell_type(table, row, col, type)

got it , thanks.

One more question about the subject

How do you “attach” a style to the cell types 1,2,3 and 4

Set style to the table by lv_table_set_style(...)

https://docs.littlevgl.com/en/html/object-types/table.html#_CPPv418lv_table_set_styleP8lv_obj_t16lv_table_style_tPK10lv_style_t

use style type as the following
LV_TABLE_STYLE_CELL1
LV_TABLE_STYLE_CELL2
LV_TABLE_STYLE_CELL3
LV_TABLE_STYLE_CELL4

and then set style_type to the cell as you want
by lv_table_set_cell_type(table, row, col, type)

https://docs.littlevgl.com/en/html/object-types/table.html#_CPPv422lv_table_set_cell_typeP8lv_obj_t8uint16_t8uint16_t7uint8_t

2 Likes