Hello,
I have table created by code below. I need to shrink cell high and width as much as it possible. I don’t want to leave space between values at all. How to achieve this?
How to add vertical lines in this table?
void lv_example_table_A(void)
{
lv_obj_t* table = lv_table_create(lv_scr_act(), NULL);
lv_table_set_col_cnt(table, COL_COUNT);
lv_table_set_row_cnt(table, ROW_COUNT);
lv_obj_align(table, NULL, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_local_text_font(table, LV_TABLE_PART_BG, LV_STATE_DEFAULT, &lv_font_montserrat_12);
for (int i = 0; i < COL_COUNT; i++)
{
lv_table_set_col_width(table, i, COL_WIDTH);
}
for (int i = 0; i < ROW_COUNT; i++)
{
for (int j = 0; j < COL_COUNT; j++)
{
lv_table_set_cell_type(table, i, j, 2);
char str[80];
sprintf(str, "%d%d", i,j);
lv_table_set_cell_value(table, i, j, str);
}
}
}