Description
I’m trying to set the size of a tabview like the size of his parent, but I can`t display correctly. Also I would like to set the height of the tab buttons smaller but I can’t find how to do.
What MCU/Processor/Board and compiler are you using?
ESP32 nodeMCU with Arduino IDE and ili9341 240x320 display
What LVGL version are you using?
7.8.1
What do you want to achieve?
Display the tabview full screen and set the tab heights smaller
Code to reproduce
The code block(s) should be formatted like:
r//MIDDLE
bg_middle = lv_obj_create(scr, NULL);
lv_obj_clean_style_list(bg_middle, LV_OBJ_PART_MAIN);
lv_obj_set_style_local_bg_opa(bg_middle, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT,LV_OPA_COVER);
lv_obj_set_style_local_bg_color(bg_middle, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
lv_obj_set_pos(bg_middle, 0, 50);
lv_obj_set_size(bg_middle, LV_HOR_RES, 320);
lv_obj_set_size(bg_middle, LV_VER_RES, 190);
// TAB
tabview = lv_tabview_create(bg_middle, NULL);
lv_obj_set_size(tabview, LV_HOR_RES, 320);
lv_obj_set_size(tabview, LV_VER_RES, 190);
lv_tabview_set_btns_pos(tabview, LV_TABVIEW_TAB_POS_BOTTOM);
lv_obj_add_style(tabview, LV_TABVIEW_PART_TAB_BTN, &smallFont);
lv_obj_t *tab1 = lv_tabview_add_tab(tabview, "Medidas");
lv_page_set_scroll_propagation(tab1, false);
lv_obj_t *tab2 = lv_tabview_add_tab(tabview, "Graficos");
lv_page_set_scroll_propagation(tab2, false);
lv_obj_t *tab3 = lv_tabview_add_tab(tabview, "Ajustes");
lv_page_set_scroll_propagation(tab3, false);
If I set the width an height with I can disply the tabs at the bottom but they don’t have the correct width
lv_obj_set_size(tabview, LV_HOR_RES, 320);
lv_obj_set_size(tabview, LV_VER_RES, 190);