Hi i there a way to disable scrolling when using tabs, ive tried
lv_obj_clear_flag(tabview), LV_OBJ_FLAG_SCROLLABLE);
or
lv_obj_clear_flag(tabview), LV_OBJ_FLAG_SCROLL_CHAIN_HOR);
but that didnt work
Hi.
Can you tell me which project exactly are you trying to modify?
Regards,
Sara
Hi.
Try adding the following lines
lv_obj_t *tabview_content = lv_tabview_get_content(tabview); lv_obj_clear_flag(tabview_content, LV_OBJ_FLAG_SCROLLABLE); lv_obj_clear_flag(tabview_content, LV_OBJ_FLAG_SCROLL_CHAIN_HOR);
After creating the tab view:
// Create a Tab view object lv_obj_t * tabview; tabview = lv_tabview_create(lv_screen_active()); lv_tabview_set_tab_bar_size(tabview, 40);
Let me know if this works.
Regards,
Sara
it works partially, cannot drag between tabs but can drag inside a tab, objects does recenter automatically but very slowly and lagging
Hi.
I tested it on my side, and it is working correctly…
Did you change anything else on the code? Can you send me a quick video showing the issue?
To share a video, upload it to google drive and then, share a link to the file.
Regards,
Sara
i have added a keypad on the last tab and i can drag it https://drive.google.com/file/d/1HZKDJFrPnJ1tHxUsuZTaGRf_KHQ4wSY-/view?usp=sharing
Hi.
In that case, I think you need to clear the flag of the individual tabs you want to remove scrolling. For example:
If you want to apply to the following tab
lv_obj_t * tab1 = lv_tabview_add_tab(tabview, "Outputs");
Add this after
lv_obj_clear_flag(tab1, LV_OBJ_FLAG_SCROLLABLE); lv_obj_clear_flag(tab1, LV_OBJ_FLAG_SCROLL_CHAIN_HOR);
Let me know if this works.
Regards,
Sara