I’m working on a project using LVGL Wayland version 7.1.0. I’ve encountered an issue with scrolling a list that contains checkboxes as children. Here’s the setup:
-
I created a list and added checkboxes as its children (Width and Height of the checkboxes are of default size even though I tried to change explicitly with lv_obj_set_size it doesnot work out for me).
-
As I added more checkboxes, a scrollbar appeared, which indicates that the content exceeds the height of the list.
-
However, I am unable to scroll the list by dragging it with touch. The list doesn’t respond to dragging, and only the
LV_EVENT_CLICKED
event is triggered in the event callback for list. -
I can programmatically move the scrollbar using
lv_obj_set_y(scrl, -80)
for example, but I cannot achieve the same effect with touch.
Question:
How can I enable scrolling the list by dragging it with touch? Is there a specific flag or configuration I might be missing to allow drag-based scrolling? Any guidance or example would be appreciated!
Thanks in advance for your help!
Sample Code:
lv_obj_t * list = lv_list_create(lv_scr_act(),NULL);
lv_obj_set_pos(list,10,10);
lv_obj_set_size(list,150,100);
lv_obj_set_layout(list,LV_LAYOUT_COLUMN_LEFT);
lv_obj_t * cb1=lv_checkbox_create(list,NULL);
lv_checkbox_set_text(cb1,”Checkbox1”);
lv_obj_t * cb2=lv_checkbox_create(list,NULL);
lv_checkbox_set_text(cb2,”Checkbox1”);
lv_obj_t * cb3=lv_checkbox_create(list,NULL);
lv_checkbox_set_text(cb3,”Checkbox1”);