Back

RemoveLayout

Hello World

Removes a layout added to the app.

app.RemoveLayout( layout )

See also: AddLayout

Example - Vertical

function OnStart()
{
    lay = app.CreateLayout( "Linear", "FillXY,VCenter" );

    txt = app.CreateText( "Hello" );
    txt.SetTextSize( 50 );
    lay.AddChild( txt );

    btn = app.CreateButton( "Remove" );
    btn.SetOnTouch( RemoveDrawer );
    lay.AddChild( btn );

    app.AddLayout( lay );
}

function RemoveDrawer() {
    app.RemoveLayout( lay );
}
    Copy     Copy All       Run      
app object: Layout