Back

ShowCheckList

JS Py
Hello World
Content:
- Methods

The check list provides a similar functionality to the “Multi” ListDiaog, although you can adjust its initial check states with an object structure.

ckl = app.ShowCheckList( title, list, callback?, width=-1, height=-1, options? ) → app object: CheckList

Example - 2

function OnStart()
{
    app.ShowCheckList( "Select Animals", "Sheep:true,Cows:false,Pigs:false", OnFinish, 0.8, 0.5 );
}

function OnFinish( data )
{
    if( data )
        app.ShowPopup( JSON.stringify(data) );
    else
        app.ShowPopup( "Cancelled" );
}
from native import app

def OnStart():
    app.ShowCheckList( "Select Animals", "Sheep:true,Cows:false,Pigs:false", OnFinish, 0.8, 0.5 )

def OnFinish(data):
    if data:
        app.ShowPopup( JSON.stringify(data) )
    else:
        app.ShowPopup( "Cancelled" )
    Copy     Copy All       Run      

Methods

The following methods are available on the CheckList object:

Show()
String
Number: fraction (0..1)
String: sun-moon
String: title:checked
List: of objects: [{ title, check }]
String: title:checked
List: of objects: { title, check }
Object: { title, checked }
function( data )
ckl.SetList
Set list
ckl.Show
Show the check list