V8.0 Disable tabview sliding

Important: unclear posts may not receive useful answers.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Read the

Delete this section if you read and applied the mentioned points.

Description

In 6.2 Tabview had an option to disable sliding (lv_tabview_set_sliding), I can’t find it in 8.0 or any way in the documentation to turn this off.

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

I’m using the simulator.

What do you want to achieve?

Disable Tabview Sliding, only changing tabs by clicking the buttons

What have you tried so far?

I have tried lv_obj_set_scrollbar_mode(main_tabview, LV_SCROLLBAR_MODE_OFF);

Code to reproduce

Add the relevant code snippets here.

The code block(s) should be between ```c and ``` tags:

/*You code here*/
main_tabview = lv_tabview_create(lv_scr_act(), LV_DIR_TOP, 20);
    lv_obj_set_size(main_tabview, 320, 146);
    lv_obj_set_pos(main_tabview, 0, 24);
    lv_obj_add_flag(lv_tabview_get_tab_btns(main_tabview), LV_OBJ_FLAG_HIDDEN);
	lv_obj_add_style(main_tabview, &cont_style, 0);
	lv_obj_set_scrollbar_mode(main_tabview, LV_SCROLLBAR_MODE_OFF);

    for (i = 0; i < MAX_WIN_ID; i++)
	{
		tab_win[i] = lv_tabview_add_tab(main_tabview, tab_name[i]);
		lv_obj_set_scrollbar_mode(tab_win[i], LV_SCROLLBAR_MODE_OFF);
		tab_win_create[i](tab_win[i]);
        lv_obj_add_style(tab_win[i], &pad_style, 0);
	} 

Screenshot and/or video

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

do this:

lv_obj_clear_flag(t1, LV_OBJ_FLAG_SCROLLABLE);

Thank you very much, it has been solved.

One more question, I want to set a button and a list in a tab, I just want the list to slide, but the problem I’m currently having is but when I slide the list, the button will slide with it, how should I fix this problem? Thanks!