Not visible, when LV_ALIGN_OUT_


I have image temp_home_pic plalced on container panel_status_small. I would like to place temp_home_label label on temp_home_pic. It works fine when I do align LV_ALIGN_IN_RIGHT_MID
as shown below:
But I don’t see label when I use LV_ALIGN_OUT_RIGHT_MID in code below:

temp_home_pic = lv_img_create(panel_status_small, NULL);
lv_img_set_src(temp_home_pic, &img_home);
temp_home_label = lv_label_create(temp_home_pic, NULL);
lv_obj_align(temp_home_label, temp_home_pic, LV_ALIGN_IN_RIGHT_MID, 0, 0);

Why I don’t see it and how to solve this problem?

Try making the container the parent of the label. Currently, you are trying to place the label outside of it’s parent.

temp_home_label = lv_label_create(panel_status_small, NULL);