How to disable swiping in Tabview

Description

I want to prevent switching to an other tab when touching the tab content
There was a description for V7 but does not work for v8

It only seems to happen when a row of buttons are added to the tabview.
So why is the tabview flag changing when a number of buttons are added to a tab?

What MCU/Processor/Board and compiler are you using?

What LVGL version are you using?

V8

What do you want to achieve?

What have you tried so far?

Tried several methods, clearing scroll flag, scroll throw etc.

Code to reproduce

The code block(s) should be formatted like:

	tabview_mid = lv_tabview_create(lv_scr_act(), LV_DIR_TOP, 40);
	lv_obj_set_pos(tabview_mid, 0, topHeight + tunerHeight);
	lv_obj_set_size(tabview_mid, LV_HOR_RES - rightWidth - 3, screenHeight - topHeight - tunerHeight);
	
	lv_obj_t *tab1 = lv_tabview_add_tab(tabview_mid, "Waterfall");
	lv_obj_t *tab2 = lv_tabview_add_tab(tabview_mid, "Band");
	lv_obj_t *tab3 = lv_tabview_add_tab(tabview_mid, "RX");
	lv_obj_t *tab4 = lv_tabview_add_tab(tabview_mid, "TX");
	lv_obj_t *tab5 = lv_tabview_add_tab(tabview_mid, "Setup");
	
	lv_obj_clear_flag(lv_tabview_get_content(tabview_mid), LV_OBJ_FLAG_SCROLLABLE);
	lv_obj_add_event_cb(lv_tabview_get_content(tabview_mid), scroll_begin_event, LV_EVENT_SCROLL_BEGIN, NULL);

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

Any solution? i have the same issue, 8

this does the trick for me
lv_obj_clear_flag(tabview, LV_OBJ_FLAG_SCROLL_CHAIN_HOR);

1 Like