How to call Spinbox from a component

Sorry for the simple question, I’m a beginner.

What do you want to achieve?

Add an object to be controlled using physical buttons.

What have you tried so far?

When objects are detected individually on the screen, there is no problem. I can add and delete from the group.
lv_group_remove_obj(ui_Spinbox1);
lv_group_add_obj(g, ui_Spinbox1);

When I create a component that includes a Spinbox, I don’t know how to access it.
lv_group_add_obj(g, cui_Spinbox4);
error: ‘cui_Spinbox4’ was not declared in this scope
See the variables here: ui_comp_compspinbox4.с

lv_obj_t ** children = lv_mem_alloc(sizeof(lv_obj_t *) * _UI_COMP_COMPSPINBOX4_NUM);
children[UI_COMP_COMPSPINBOX4_COMPSPINBOX4] = cui_Compspinbox4;
children[UI_COMP_COMPSPINBOX4_LABEL11] = cui_Label11;
children[UI_COMP_COMPSPINBOX4_SPINBOX4] = cui_Spinbox4;
lv_obj_add_event_cb(cui_Compspinbox4, get_component_child_event_cb, LV_EVENT_GET_COMP_CHILD, children);
lv_obj_add_event_cb(cui_Compspinbox4, del_component_child_event_cb, LV_EVENT_DELETE, children);
ui_comp_Compspinbox4_create_hook(cui_Compspinbox4);
return cui_Compspinbox4;

or
v_group_add_obj(g, UI_COMP_COMPSPINBOX4_SPINBOX4);

In file included from C:\Users\vadim\OneDrive\Desktop\Proekt\Ploski\ploski\Temp_reg_v1\ui\ui_comp.h:20,
                 from C:\Users\vadim\OneDrive\Desktop\Proekt\Ploski\ploski\Temp_reg_v1\ui\ui.h:26,
                 from C:\Users\vadim\OneDrive\Desktop\Proekt\Ploski\ploski\Temp_reg_v1\ui\ui.ino:3:
C:\Users\vadim\OneDrive\Desktop\Proekt\Ploski\ploski\Temp_reg_v1\ui\ui.ino: In function 'void knop_scren2(lv_event_t*)':
C:\Users\vadim\OneDrive\Desktop\Proekt\Ploski\ploski\Temp_reg_v1\ui\ui_comp_compspinbox4.h:18:39: error: invalid conversion from 'int' to '_lv_obj_t*' [-fpermissive]
 #define UI_COMP_COMPSPINBOX4_SPINBOX4 2

The question is closed.
Direct contact is not possible.
Sample code:
lv_obj_t * child = ui_comp_get_child(ui_Compspinbox4, UI_COMP_COMPSPINBOX4_SPINBOX4);
lv_group_add_obj(g, child);

There are very few examples in the documentation for beginners.