加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex List使用2

发布时间:2020-12-15 05:05:44 所属栏目:百科 来源:网络整理
导读:mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml" width="450" height="220" ?mx:Script ??![CDATA[ ???import mx.controls.Alert; ???import mx.collections.ArrayCollection; ???[Bindable]public var titleName:String;//标题 ???[Bindable]public va
<mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml" width="450" height="220"> ?<mx:Script> ??<![CDATA[ ???import mx.controls.Alert; ???import mx.collections.ArrayCollection; ???[Bindable]public var titleName:String;//标题 ???[Bindable]public var canChooseList:ArrayCollection=new ArrayCollection(); ???[Bindable]public var chosenList:ArrayCollection=new ArrayCollection(); ???private function doChoose():void{ ????if(leftList.selectedItem){ ?????chosenList.removeAll(); ?????chosenList.addItem(leftList.selectedItem); ????}else{ ?????Alert.show("请先选择一个处理人!","提示"); ????} ???} ???private function unChoose():void{ ????chosenList.removeAll(); ???} ???public function validate():Boolean{ ????var result:Boolean=false; ????if(chosenList!=null&&chosenList.length>0){ ?????result=true; ????} ????return result; ???} ???private function filteHandler():void{ ????var txt:String=chooseUser.text; ????if(txt==null||txt==""){ ?????leftList.dataProvider=canChooseList; ????}else{ ?????var temp:ArrayCollection=new ArrayCollection(); ?????for each(var item:Object in canChooseList){ ??????var theName:String=item.handlerName; ??????if(theName.indexOf(txt)!=-1){ ???????temp.addItem(item); ??????} ?????} ?????leftList.dataProvider=temp; ????} ???} ??]]> ?</mx:Script> ?</mx:VBox>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读