Home Cooker Classes Others Rice CookerGX
Classes  >  select  >  SelectedIndex
select class : SelectedIndex getter

Description

Gets the index of the selected item.

Syntax

selectInstance.SelectedIndex

Arguments

None

Return value

ClassDescription
intThe index of the selected item.

Sample code

// anySelect is an instance of select class.

int index= anySelect.SelectedIndex;

Notes

The index is 0 based.

If multiple items are selected, the smallest index is returned.

If an item is not selected, -1 is returned.

Links for reference

Copyright © Rice All rights reserved.