The ComboBox class / ui.ComboBox methods |
Get an item position by name.
The getIndexOf() method takes an item name as parameter and returns the position of the item in the drop down list.
The first item is at position 1. The method returns 0 (zero) if the item name does not exist.
IF cb.getIndexOf("SFO") == 0 THEN CALL cb.addItem("SFO", "San Francisco International Airport, CA" ) END IF