Description
Get all buttons : childs from lv_list !
What MCU/Processor/Board and compiler are you using?
ESP32IDF with visual studio
What LVGL version are you using?
- i am using LVGL 7.3
What do you want to achieve?
i need to get all the button insdie the list to do some stuffs !
What have you tried so far?
I tried to get the child from lv_list , but it doesnt show it …
Code to reproduce
- lv_obj_t *list_of_actions_btn;
lv_obj_t *list_of_actions;
list_of_actions = lv_list_create(screenAction1, NULL);
for (int i = 0; i < 3; i++)
{
char *name = cJSON_GetObjectItem(arrayChannel, “name”)->valuestring;
LV_IMG_DECLARE(img1620211926196_png);
list_of_actions_btn = lv_list_add_btn(list_of_actions, &img1620211926196_png, name);
}
lv_obj_t *child = lv_obj_get_child_back(list_of_actions, NULL);
while (child)
{
printf("Child is : %s\n", lv_list_get_btn_text(child));
child = lv_obj_get_child_back(list_of_actions, child);
}
Screenshot and/or video
Not usefull