Lv_obj_clean() on list widgets?


the list widget is a multipart object. When lv_obj_clean() is applied onto such a widget, all the sub-parts are wiped.

Maybe it would make sense that multipart container objects would forward calls like lv_obj_clean() to the relevant sub-part?

AFAIR, such a forwarding is already implemented for some functions (dragging?)

v7: It’s recommended to use lv_list_clean when deleting all the buttons from a list, to solve precisely that problem.

v8: lv_obj_clean should work, as scrolling is now handled by the top-level list widget and the additional container no longer exists.


Ah, I see!


In LVGL 8.0, lv_list_clean does not exist. Please elaborate how to get same result in LVGL 8.0

Thanks for noting that; please refer to my updated answer. :slightly_smiling_face: