SelectedGadgetItem ( gadget )
Parameters
| gadget - combo box, list box or tabber |
Description
|
Returns the index of the selected item, or -1 if nothing is selected. Requires Extended language mode. For a combo box this is the entry currently shown; for a tabber, the active tab. Items count from 0, so the result plugs straight into GadgetItemText. On a multi-select list box (style 1) it returns the lowest selected index only. To see the whole selection, use CountSelectedGadgetItems and walk it with NextSelectedGadgetItem. A good moment to call it is on a $401 gadget-action event from the control - for combo boxes and tabbers EventData carries the same index the event was about. See also: SelectGadgetItem, CountSelectedGadgetItems, NextSelectedGadgetItem, GadgetItemText. |
Index