ListDialog creates a dialog box to display a list in the app.
Example - Example
function OnStart()
{
dlg = app.CreateListDialog( "Choices", "Add,Remove,Delete" );
dlg.SetOnTouch( dlg_OnTouch );
dlg.Show();
}
function dlg_OnTouch( item )
{
app.ShowPopup( item );
}
Example - Multi
function OnStart()
{
dlg = app.CreateListDialog( "Days", "Mon,Tues,Wed,Thurs,Fri,Sat,Sun", "Multi" );
dlg.SetOnTouch( dlg_OnTouch );
dlg.Show();
}
function dlg_OnTouch( item, isChecked )
{
app.ShowPopup( item + " isChecked = " + isChecked );
}
The following methods are avaiable on the ListDialog object:
string
string - "Multi" or "?"
number
set color effects
destroys object
hide dialog
Set visibility "Hide"
?
string -
hexadecimal: "#rrggbb", "#aarrggbb"
colourName: "red", "green", ...
changes the background color
string - path to file or folder ( "/absolute/..." or "relative/..." )
unknown
changes the background image
function()
called when user touches object
number - fraction of screen width
number - fraction of screen height
change object size
change text str_col
change dialog title
Set visibility "Show"
object id