To your combobox/listbox problem: You simply forgot to update your combobox after creating all the list items.

As for the problem of getting the number of a listitem: list_lines is NOT the first list item in the linked list, it's the parent listbox! So you have to use LBG_object_getnum(list_lines->item_first, selectedLineItem); instead.