diff --git a/docs/src/details/auxiliary-modules/obj_id.rst b/docs/src/details/auxiliary-modules/obj_id.rst index df9626bc7..00d19fc85 100644 --- a/docs/src/details/auxiliary-modules/obj_id.rst +++ b/docs/src/details/auxiliary-modules/obj_id.rst @@ -190,7 +190,8 @@ that the Widget no longer exists. Find child by ID ---------------- +.. warning:: + ``lv_obj_find_by_id(widget, id)`` is deprecated. To find a widget use ``obj_name``. + :cpp:expr:`lv_obj_find_by_id(widget, id)` will perform a recursive walk through ``widget``\ 's children and return the first child encountered having the given ID. - - diff --git a/src/core/lv_obj.h b/src/core/lv_obj.h index b63f22ef9..21954e993 100644 --- a/src/core/lv_obj.h +++ b/src/core/lv_obj.h @@ -399,6 +399,9 @@ void lv_obj_set_id(lv_obj_t * obj, void * id); void * lv_obj_get_id(const lv_obj_t * obj); /** + * DEPRECATED IDs are used only to print the widget trees. + * To find a widget use `lv_obj_find_by_name` + * * Get the child object by its id. * It will check children and grandchildren recursively. * Function `lv_obj_id_compare` is used to matched obj id with given id.