<?xml version="1.0" encoding="utf-8"?> <gui:RCPModule xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:gui="cn.smartinvoke.gui.*" xmlns:rcp="cn.smartinvoke.rcp.*" layout="vertical"> <mx:Script> <![CDATA[ import cn.smartinvoke.smartrcp.gui.CStatusLineManager; var statusError:Boolean=false; function setStatusText():void{ if(this.type_com.selected){ this.statusError=false; }else{ statusError=true; } //设置图片 var statusManager:CStatusLineManager=CStatusLineManager.Instance; statusManager.setErrorImg(this.imgType.selectedItem.value); statusManager.setMsgImg(this.imgType.selectedItem.value); if(this.statusError){ statusManager.setErrorMsg(this.infoText.text); }else{ statusManager.setMsg(this.infoText.text); } } ]]> </mx:Script> <mx:ArrayCollection id="imgs"> <mx:Object label="att_class_obj.gif" value="/icons/att_class_obj.gif"/> <mx:Object label="nav.gif" value="/icons/nav.gif"/> <mx:Object label="无"/> </mx:ArrayCollection> <mx:Panel title="演示状态栏管理器的功能" cornerRadius="0" paddingLeft="0" paddingRight="0" layout="absolute" styleName="opaquePanel" width="100%" height="100%"> <mx:RadioButton label="一般信息" groupName="type" id="type_com" x="10" y="29" selected="true"/> <mx:RadioButton label="错误信息" groupName="type" id="type_error" x="10" y="70"/> <mx:Label x="10" y="10" text="信息类型" width="76"/> <mx:List id="imgType" x="108" y="53" dataProvider="{this.imgs}" selectedIndex="0"> </mx:List> <mx:TextInput x="321" y="54" text="hello" id="infoText"/> <mx:Button x="321" y="128" label="显示输入的字符串到状态栏" click="setStatusText()"/> <mx:Label x="108" y="10" text="选择图片" width="76"/> <mx:Label x="321" y="10" text="填写消息" width="76"/> </mx:Panel> </gui:RCPModule>
smartrcp状态栏的实现示例
最新推荐文章于 2010-06-19 21:00:52 发布