Graphisoft®

Dialog ManagerVersion: 2.0

ListBox::GetSelectedItem

For single-selection list box retrieves the index of the selected item.
For multiple-selection list box retrieves the index of the next selected list item.

short GetSelectedItem (short listItem = TopItem) const;

Parameters

listItem
1-based index of the list item where the search begins. Use TopItem of Item type to search from the first item. For single-selection lists this parameter is ignored.

Return Value

For single-selection lists, the 1-based index of the selected item or zero if there is no selected item.
For multiple-selection lists, the 1-based index of the first selected item after the given listItem, including the starting item, too. If there is no such selected item, the function returns zero.
If the function parameters are incorrect, zero is returned.