When I don’t use Lv_ table_ set_ cell_ Value, Lv_ table_ set_ cell_ Type doesn’t work.
expect: When you click on a cell, it should work.
lv_sim_codeblocks_win demo:
V7.71 lv_demo_widgets.c
static void table_event_cb(lv_obj_t * table, lv_event_t e)
{
if(e == LV_EVENT_CLICKED) {
uint16_t row;
uint16_t col;
lv_res_t r = lv_table_get_pressed_cell(table, &row, &col);
if(r == LV_RES_OK && col && row) { /Skip the first row and col/
if(lv_table_get_cell_type(table, row, col) == 1) {
lv_table_set_cell_type(table, row, col, 4);
//lv_table_set_cell_value(table,row, col,“4444”);
} else {
lv_table_set_cell_type(table, row, col, 1);
//lv_table_set_cell_value(table,row, col,“1111”);
}
}
}
}