//Called when application is started.
function OnStart()
{
//Create a layout with objects vertically centered.
lay = app.CreateLayout( "linear", "VCenter,FillXY" )
lay.SetChildMargins( 0,0.02,0,0.02 )
//Show a list dialog with current theme.
function ListDialog()
{
dlg = app.CreateListDialog( "My Title", "Apples,Oranges,Bananas" )
dlg.Show()
}
//Show a chlist dialog with current theme.
function CheckListDialog()
{
var lst = [{title:"Sheep",check:true},{title:"Cows",check:false},
{title:"Pigs",check:true}, {title:"Goats",check:true}];
app.ShowCheckList( "Select Animals", lst )
}
//Show an Alert dialog with current theme.
function AlertDialog()
{
app.Alert( "Hi", "My Title" )
}
//Show a Yes/No dialog with current theme.
function YesNoDialog()
{
dlg = app.CreateYesNoDialog( "Are you sure?" )
dlg.Show()
}
//Use light theme. cfg.Light
//Called when application is started. function OnStart() {
//Create a layout with objects vertically centered. lay = app.CreateLayout( "linear", "VCenter,FillXY" ) lay.SetChildMargins( 0,0.02,0,0.02 )
}
//Handle tab selection. function tabs_OnChange( name ) { console.log( "TAB=" + name ) }
//Show a custom dialog with current theme. function CustomDialog() { dlg = app.CreateDialog( "Custom Dialog" ) layDlg = app.CreateLayout( "linear", "vertical,fillxy,center" ) dlg.AddLayout( layDlg ) txt = app.CreateText( "Hello World", 0.6 ) txt.SetMargins( 0, 0.02, 0, 0.02 ) layDlg.AddChild( txt ) lst = app.CreateList( "Fred,Bill,Jim", 0.8 ) lst.SetMargins( 0, 0.02, 0, 0.02 ) layDlg.AddChild( lst ) edt = app.CreateTextEdit( "Hello World", 0.6 ) edt.SetMargins( 0, 0.02, 0, 0.04 ) layDlg.AddChild( edt ) dlg.Show() }
//Show a list dialog with current theme. function ListDialog() { dlg = app.CreateListDialog( "My Title", "Apples,Oranges,Bananas" ) dlg.Show() }
//Show a chlist dialog with current theme. function CheckListDialog() { var lst = [{title:"Sheep",check:true},{title:"Cows",check:false}, {title:"Pigs",check:true}, {title:"Goats",check:true}]; app.ShowCheckList( "Select Animals", lst ) }
//Show an Alert dialog with current theme. function AlertDialog() { app.Alert( "Hi", "My Title" ) }
//Show a Yes/No dialog with current theme. function YesNoDialog() { dlg = app.CreateYesNoDialog( "Are you sure?" ) dlg.Show() }