Back

ListView

You can create a full screen view to display a list in your App using the CreateListView method of the app object:

 lvw = app.CreateListView( list, title, options );

Use the SetOnTouch method of the ListView object to set the name of a function you want to be called when a list item is selected. The selected item is passed into your OnTouch callback function as parameters every time an item is selected.

Example

function OnStart()
{
    lvw = app.CreateListView( "Mon,Tues,Wed,Thurs,Fri,Sat,Sun", "Days" );
    lvw.SetOnTouch( lvw_OnTouch );
    lvw.Show();
}

function lvw_OnTouch( item )
{
    app.ShowPopup( item );
}
    Copy     Copy All      Run     

See 'CreateListView for more informations and a complete function list