Select Text
Simple and fully customizable
user interface component.
Design for mobile app development
on Apache Cordova framework.
// JavaScript Code Example:
var itemList = [
{id: "0", name: "(unselected)"},
{id: "1", name: "Banana"},
{id: "2", name: "Pineapple"},
{id: "3", name: "Peach"},
{id: "4", name: "Avocado"},
{id: "5", name: "Melon"},
{id: "6", name: "Lemon and Lime"},
{id: "7", name: "Orange"},
{id: "8", name: "Kiwi (or Kiwifruit)"},
{id: "9", name: "Passion Fruit"},
{id: "10", name: "Grapefruit"},
{id: "11", name: "Papaya"},
{id: "12", name: "Coconut"}
]
var uiSelectFruits
function start() {
uiSelectFruits = createSelectText()
that.setItems(itemList)
that.onChange(printSelectedIndex)
that.setSelectedIndex(1)
that.center()
}
function printSelectedIndex(self, index) {
print("Selected item index: " + index)
}