Description
In 7.5 when you clicked on a table it didnt change the row size or position. In 8.1 it does. How can I prevent this?
What MCU/Processor/Board and compiler are you using?
Simulator
What LVGL version are you using?
8.1
What do you want to achieve?
Prevent the table from re-sizing and moving
What have you tried so far?
Docs
Code to reproduce
void create_tabCalendar(lv_obj_t * parent)
{
calendartable = lv_table_create(parent);
//8.1 to fix
//lv_obj_set_drag_parent(calendartable, true);
lv_obj_set_style_radius(calendartable, 10, 0);
lv_obj_set_style_clip_corner(calendartable, true, 0);
lv_obj_set_pos(calendartable, 50, 12);
lv_obj_set_style_pad_top(calendartable, 2, LV_PART_ITEMS);
lv_obj_set_style_pad_bottom(calendartable, 2, LV_PART_ITEMS);
lv_obj_set_style_pad_left(calendartable, 10, LV_PART_ITEMS);
lv_obj_set_style_pad_right(calendartable, 10, LV_PART_ITEMS);
lv_obj_set_style_pad_top(calendartable, 2, LV_TABLE_PART_CELL1);
lv_obj_set_style_pad_bottom(calendartable, 2, LV_TABLE_PART_CELL1);
lv_obj_set_style_pad_left(calendartable, 10, LV_TABLE_PART_CELL1);
lv_obj_set_style_pad_right(calendartable, 10, LV_TABLE_PART_CELL1);
lv_obj_set_style_text_font(calendartable, &lv_font_montserrat_18, LV_TABLE_PART_CELL1);
lv_table_set_col_cnt(calendartable, 4);
lv_table_set_row_cnt(calendartable, calendarRows+1);
lv_table_set_col_width(calendartable, 0, 200);
lv_table_set_col_width(calendartable, 1, 300);
lv_table_set_col_width(calendartable, 2, 200);
lv_table_set_col_width(calendartable, 3, 200);
//Set table header
lv_obj_set_style_pad_top(calendartable, 2, LV_TABLE_PART_CELL3);
lv_obj_set_style_pad_bottom(calendartable, 2, LV_TABLE_PART_CELL3);
lv_obj_set_style_pad_left(calendartable, 10, LV_TABLE_PART_CELL3);
lv_obj_set_style_pad_right(calendartable, 10, LV_TABLE_PART_CELL3);
lv_obj_set_style_text_font(calendartable, &lv_font_montserrat_24, LV_TABLE_PART_CELL3);
//8.1 to fix
//lv_table_set_cell_type(calendartable, 0, 0, LV_TABLE_PART_CELL3);
//lv_table_set_cell_type(calendartable, 0, 1, LV_TABLE_PART_CELL3);
//lv_table_set_cell_type(calendartable, 0, 2, LV_TABLE_PART_CELL3);
//lv_table_set_cell_type(calendartable, 0, 3, LV_TABLE_PART_CELL3);
lv_table_set_cell_value(calendartable, 0, 0, "Calendar");
lv_table_set_cell_value(calendartable, 0, 1, "Summary");
lv_table_set_cell_value(calendartable, 0, 2, "Start");
lv_table_set_cell_value(calendartable, 0, 3, "End");
}
Screenshot and/or video
Before click:
After click:
Thanks!