分类: Web开发
2013-01-20 17:18:48
代码片段:
private var zhpfxName:ArrayCollection = new ArrayCollection(); private var zhpfxValue:ArrayCollection = new ArrayCollection(); ////////////////////////////////////////////动态创建组件,并赋值 var name:spark.components.Label = new spark.components.Label(); var value:TextInput = new TextInput(); name.id = "zhpfxName_"+arr[i].s0; name.text = arr[i].s1; name.width = 80; value.id = "zhpfxValue_"+arr[i].s0; value.width = 80; zhpfxName.addItem(name); zhpfxValue.addItem(value); /////////////////////////////////////////////从动态创建的组件中,获得组件属性 if(zhpfxName.length > 0){ for(var i:int = 0; i