List scrollbar does not shown (v7-dev)

Description

When adding lists, sometimes the scrollbar is not shown

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

Simulator in CodeBlocks, v7-dev

What do you experience?

In my program, I add several lists, but only the first one shows the scrollbars. I had it configured in auto mode at the beginning, and the second list inherited the first and was not shown. I have configured in mode ON, and set again the scrollbar mode in the second list, but does not show up.

What do you expect?

In my program, when using v6, the lists inherited correctly the modes, and showed the scrollbars correctly.

Code to reproduce

I have actualliy tested this code (is a simplification of my whole code) and the scrollbars only show in the first list

    lv_obj_t * scr;
    lv_obj_t* list, *pre_list;

    scr = lv_obj_create(NULL, NULL);

    list = lv_list_create(scr, NULL);
    lv_list_set_sb_mode(list, LV_SCRLBAR_MODE_ON);
    pre_list = list;
    list = lv_list_create(scr, list);
    lv_list_set_sb_mode(list, LV_SCRLBAR_MODE_ON);
    lv_obj_align(list, pre_list, LV_ALIGN_OUT_RIGHT_TOP, 5, 0);

    lv_disp_load_scr(scr);

Screenshot and/or video

Sin%20t%C3%ADtulo
If possible, add screenshots and/or videos about the current issue.

I can confirm that this is a bug. My initial guess was that something didn’t get copied from the old list to the new one, but I haven’t been able to find any evidence of that yet.

I look for the bug in the code but did not find anything. I also suspected of the copy, that’s why I set the property to the second list also, but did not work. I don’t know lvgl deeply enough to have more ideas of what’s happening. I hope you find it easily.

Thanks!

Alex

@embeddedt
I struggled a lot with the scrollbars a few weeks ago and - although I saw that you have assigned it to yourself - I couldn’t stand to check it.

It was only a simple thing: the styles were not copied in lv_page_create. I’ve pushed a fix.

1 Like

I figured it would be something simple like that. Thanks!

Thank you. I’ve already downloaded last version and is working fine.

Thanks!

Alex