Hecl Builder

Easy Mobile Applications

ListExample
Download: .jad .jar
2.0/5 Average rating:

MIDP Version: 2.0
Description: lcdui.list example
Last updated: Mon Oct 27 14:47:24 +0000 2008 by davidw

set selectcmd [lcdui.command -label Select -longlabel Select -type item -priority 1]
set lst [lcdui.list -title "List Example" -commandaction selectname]
set names {Anna Barbara Carla Daniela Emanuela Federica}
foreach n $names {
    $lst append $n
}
$lst setcurrent
$lst addcommand $selectcmd
proc selectname {cmd lst} {
    global names
    [lcdui.alert -text "Selected: [lindex $names [$lst selection get]]"] setcurrent
}


Note: If you have trouble with the applets on this site, you might try upgrading your Jave Runtime Environment, in order to get the "Next-Generation Java Plug-In", available for download here: http://download.java.net/jdk6/