[英]how to remove form,formitems in flex
在我的應用程序中使用表單...
<mx:Form x="10" y="22" id="f1" >
<mx:FormItem label="Location Code" id="labandtext">
<mx:TextInput id="locCodeTxt" editable="false"/>
</mx:FormItem>
</mx:Form>
使用以下內容刪除表單:
f1.removeAllChildren();
如果我想獲取removedChildren(FormItems,TextInput)...我怎樣才能找回那些孩子們(FormItems,TextInput)...請給出一些建議......謝謝xxx .. :-)
盡量不要將它們從顯示列表中刪除。 你可以隱藏它們:
f1.visible = false;
f1.includeInLayout = false;
然后,在需要Form時將這些屬性設置為true。
您可以輕松地將它們存儲在Array中。
刪除之前你可以說。
var previousChildren:Array = f1.getChildren();
f1.removeAllChildren()
;
如果你想重新添加它們,你可以使用:
for each(var element:FormItem in previousChildren){
f1.addElement(element);
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.