smartrcp状态栏的实现示例

<?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> 
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值