This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
sample_code:layout_children [2014/12/11 13:17] 84.181.41.137 [Layout Children] |
sample_code:layout_children [2014/12/29 02:20] (current) |
||
---|---|---|---|
Line 42: | Line 42: | ||
return children; | return children; | ||
} | } | ||
+ | </ | ||
+ | ===== clearLayout ===== | ||
+ | <code JavaScript clearlayout.js> | ||
+ | function clearLayout(layt) | ||
+ | { | ||
+ | // | ||
+ | var allobjs = app.GetObjects(); | ||
+ | var obj, | ||
+ | // | ||
+ | for (var id in allobjs) | ||
+ | { | ||
+ | obj = allobjs[id] | ||
+ | // | ||
+ | order = layt.GetChildOrder( obj ); | ||
+ | if( order > | ||
+ | { | ||
+ | // | ||
+ | layt.DestroyChild( obj ); | ||
+ | } | ||
+ | } | ||
+ | } | ||
</ | </ | ||
===== Sample app ===== | ===== Sample app ===== |