flex组件使用【PopUpMenuButton】
发布时间:2020-12-15 03:42:38 所属栏目:百科 来源:网络整理
导读:?xml?version="1.0"?encoding="utf-8"?mx:Application?xmlns:mx="http://www.adobe.com/2006/mxml"?layout="absolute"?mx:XMLList?id="xmllist"??node?label="考试系统"/??node?label="培训系统"/??node?type="separator"/??node?label="关闭系统"/?/mx:XMLL
<?xml?version="1.0"?encoding="utf-8"?> <mx:Application?xmlns:mx="http://www.adobe.com/2006/mxml"?layout="absolute"> ?<mx:XMLList?id="xmllist"> ??<node?label="考试系统"/> ??<node?label="培训系统"/> ??<node?type="separator"/> ??<node?label="关闭系统"/> ?</mx:XMLList> ?<mx:PopUpMenuButton?id="popB"?itemClick="itemclick(event)"?creationComplete="initpop();"?labelField="@label"?dataProvider="{xmllist}"?x="154"?y="93"?label="PopUpMenuButton"/> ? ?<mx:Script> ??<![CDATA[ ???import?mx.controls.*; ???import?mx.events.*; ??? ???private?function?initpop():void{ ????popB.label="--请选择--"; ???} ???private?function?itemclick(event:MenuEvent):void{ ????popB.label=event.label; ????Alert.show(event.label+"-"+event.index); ???} ??]]> ?</mx:Script> </mx:Application> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |