lv_obj_move_to_index() function
moves the object to the given index in its parent. When used in listboxes, it can be used to sort the listbox items.
Syntax
void lv_obj_move_to_index(struct _lv_obj_t * obj,
int32_t index);
Arguments
obj
pointer to the object to be moved.
index
new index in parent. -1 to count from the back
Notes
to move to the background: lv_obj_move_to_index(obj, 0) to move forward (up): lv_obj_move_to_index(obj, lv_obj_get_index(obj) - 1)