What MCU/Processor/Board and compiler are you using?
What do you want to achieve?
I’d like to put a “back” button on the top left corner of a tabview, just beside the first tab header. I could achieve something similar by going back when the first tab is selected and give it an appropriate name/symbol, but I was wondering if there was a more direct way to achieve it.
What have you tried so far?
I placed a button above the tabview, in the position I wish it to be; it works, but the tab headers should be shifted right, otherwise the first one is covered.
Code to reproduce
lv_obj_t *tabview = lv_tabview_create(lv_scr_act(), NULL); lv_obj_t *tab1 = lv_tabview_add_tab(tabview, "tab1"); lv_obj_t *tab2 = lv_tabview_add_tab(tabview, "tab2"); lv_obj_t *tab3 = lv_tabview_add_tab(tabview, "tab3"); lv_obj_t *btn = lv_btn_create(tabview, NULL); lv_obj_t *lbl = lv_label_create(btn, NULL); lv_label_set_text(lbl, "back"); lv_obj_align(btn, tabview, LV_ALIGN_IN_TOP_LEFT, 0, 0);