C4 Engine
C4 Engine API Documentation

ListWidget::GetSelectedListItem

Defined in:  C4Widgets.h
Returns the selected list item with a specific index.
Prototype

Widget *GetSelectedListItem(int32 index) const;

Parameters
index The index of the selected list item to return, where the first selected list item has the index 0.
Description
The GetSelectedListItem function returns a pointer to the selected list item whose zero-based index among all selected list items is specified by the index parameter. If the value of index is greater than or equal to the number of selected items in the list (or if index is negative), then the return value is nullptr.

Selected list items are indexed in the order in which they appear in the list, and not in the order in which they were selected.
See Also

ListWidget::GetFirstSelectedListItem

ListWidget::GetLastSelectedListItem

ListWidget::GetSelectedListItemCount