User Tools

Site Tools


sample_code:search

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sample_code:search [2018/09/12 20:15]
77.125.22.166 created
sample_code:search [2018/09/13 14:50]
Line 1: Line 1:
-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( surch ); 
-    lay.AddChild( edt ); 
-     
-    for(i = 0;i<=150;i++) 
-    { 
-        btn[i] = app.CreateButton( word ); 
-        word++; 
-    } 
-     
-    //Add layout to app.  
-    app.AddLayout( lay ); 
-} 
  
-function surch () 
-{ 
-    for( var s = 0 ; s <= 150 ; s++ ){ 
-     if (edt.GetText() == btn[s].GetText()) 
-     { 
-         lay.AddChild( btn[s] ); 
-          
-         break; 
-     } 
-    } 
-} 
sample_code/search.txt ยท Last modified: 2018/09/13 14:50 (external edit)