How to set scrollbar in tabview?


Id like to set the scrollbar properties in a tabview.
Ive tried adapting the content from here
But no luck

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


What LVGL version are you using?


What do you want to achieve?

As description

What have you tried so far?

Code to reproduce

The code block(s) should be formatted like:

    /*Set scrollbar props*/
    /*Remove the style of scrollbar to have clean start*/
    lv_obj_remove_style(lv_tabview_get_content(tv), NULL, LV_PART_SCROLLBAR | LV_STATE_ANY);

    /*Create a transition the animate the some properties on state change*/
    static const lv_style_prop_t props[] = {LV_STYLE_BG_OPA, LV_STYLE_WIDTH, 0};
    /*Create a style for the scrollbars*/
    static lv_style_transition_dsc_t trans;
    lv_style_transition_dsc_init(&trans, props, lv_anim_path_linear, 200, 0, NULL);

    static lv_style_t _style;
    lv_style_set_width(&_style, 4);      /*Width of the scrollbar*/
    lv_style_set_pad_right(&_style, 5);  /*Space from the parallel side*/
    lv_style_set_pad_top(&_style, 5);    /*Space from the perpendicular side*/

    lv_style_set_radius(&_style, 2);
    lv_style_set_bg_opa(&_style, LV_OPA_70);
    lv_style_set_bg_color(&_style, lv_palette_main(LV_PALETTE_BLUE));
    lv_style_set_border_color(&_style, lv_palette_darken(LV_PALETTE_BLUE, 3));
    lv_style_set_border_width(&_style, 2);
    lv_style_set_shadow_width(&_style, 8);
    lv_style_set_shadow_spread(&_style, 2);
    lv_style_set_shadow_color(&_style, lv_palette_darken(LV_PALETTE_BLUE, 1));

    lv_style_set_transition(&_style, &trans);

    /*Make the scrollbars wider and use 100% opacity when scrolled*/
    static lv_style_t style_scrolled;
    lv_style_set_width(&style_scrolled, 8);
    lv_style_set_bg_opa(&style_scrolled, LV_OPA_COVER);

    lv_obj_add_style(lv_tabview_get_content(tv), &_style, LV_PART_SCROLLBAR);
    lv_obj_add_style(lv_tabview_get_content(tv), &style_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED);

Screenshot and/or video

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