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.
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)
lv_obj_move_to_index() is called by 13 functions and calls 5 functions:
![]()
lv_obj_move_to_index()
lv_obj_move_to_index() reads 3 variables:
![]()
lv_obj_move_to_index()