xtd 0.2.0
Loading...
Searching...
No Matches

◆ selected_indices()

std::vector< size_t > xtd::forms::checked_list_box::selected_indices ( ) const
overridevirtualnoexcept

Gets a collection that contains the zero-based indexes of all currently selected items in the list_box.

A list_box.selected_index_collection containing the indexes of the currently selected items in the control. If no items are currently selected, an empty ListBox.SelectedIndexCollection is returned.

Remarks
For a multiple-selection list_box, this property returns a collection containing the indexes to all items that are selected in the list_box. For a single-selection ListBox, this property returns a collection containing a single element containing the index of the only selected item in the list_box. For more information about how to manipulate the items of the collection, see list_box::selected_index_collection.
The list_box class provides a number of ways to reference selected items. Instead of using the selected_indices property to obtain the index position of the currently selected item in a single-selection list_box, you can use the selected_index property. If you want to obtain the item that is currently selected in the list_box, instead of the index position of the item, use the selected_item property. In addition, you can use the selected_items property if you want to obtain all the selected items in a multiple-selection list_box.

Reimplemented from xtd::forms::list_box.