(Created by: Omer Meshy)

btn = [];
word = 0;
//Called when application is started.
function OnStart()
{
    //Create a layout with objects vertically centered.
    lay = app.CreateLayout( "linear", "top,FillXY" );	
    edt = app.CreateTextEdit( "", 0.7 );
    edt.SetOnEnter( search );
    lay.AddChild( edt );
 
    for(i = 0;i<=150;i++)
    {
        btn[i] = app.CreateButton( word );
        word++;
    }
 
    //Add layout to app.	
    app.AddLayout( lay );
}
 
function search ()
{
    for( var s = 0 ; s <= 150 ; s++ ){
     if (edt.GetText() == btn[s].GetText())
     {
         lay.AddChild( btn[s] );
 
         break;
     }
    }
}