User Tools

Site Tools


sample_code:layout_children

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
sample_code:layout_children [2014/12/11 13:17]
84.181.41.137 [Layout Children]
sample_code:layout_children [2014/12/28 17:49]
stevegarman add clearLayout
Line 42: Line 42:
   return children;    return children; 
  
 +</code>
 +===== clearLayout =====
 +<code JavaScript clearlayout.js>
 +function clearLayout(layt)
 +{
 +  //takes a layout as an argument 
 +  var obj, order; 
 +  //loop through all controls 
 +  for (var id in _map) 
 +  { 
 +      obj = _map[id] 
 +      //check if control is on our layout 
 +      order = layt.GetChildOrder( obj ); 
 +      if( order > -1 ) 
 +      { 
 +          //got one! 
 +          layt.DestroyChild( obj ); 
 +      } 
 +   }
 +
 </code> </code>
 ===== Sample app ===== ===== Sample app =====
sample_code/layout_children.txt · Last modified: 2014/12/29 02:20 (external edit)