In the encoder case, how can I get the btn's index in list?

Hi all,
Now, my encoder can roll the list. But I can’t acquire the index of btn.
My idea is int free_num = lv_list_get_btn_index(list,lv_list_get_btn_selected(list));

But it doesn’t work.

emmm, I know it.
int free_num = lv_list_get_btn_index(list,lv_group_get_focused(group));