Flex 窗体 最大化、最小化实例

 ---导入flexMdi.swc (http://code.google.com/p/flexmdi/);---
----测试代码----
Xml代码
  1. <? xml   version = "1.0"   encoding = "utf-8" ?>   
  2. <!--flexmdi针对样式、效果常用功能的简化例子-->   
  3. < mx:Application   xmlns:mx = "http://www.adobe.com/2006/mxml"   layout = "vertical"   xmlns:flexmdi = "http://flexmdi.googlecode.com/" >   
  4.     < mx:Script >   
  5.         <![CDATA[  
  6.             private function createWin():void{  
  7.                 var win:MDIWindow = new MDIWindow();  
  8.                 win.width = 350;  
  9.                 win.title = "Window " + String(mdiCanvas.windowManager.windowList.length + 1);  
  10.                 mdiCanvas.windowManager.add(win);  
  11.             }  
  12.         ]]>   
  13.     </ mx:Script >   
  14.     < mx:Style >   
  15.         MDIWindow{  
  16.             backgroundColor:#000000;  
  17.             backgroundAlpha:0.9;  
  18.             borderColor: #000000;  
  19.             borderAlpha: 0.7;  
  20.             headerHeight:22;  
  21.          }  
  22.     </ mx:Style >   
  23.     < mx:Button   id = "showWin"   label = "创建窗体"   click = "createWin()" />   
  24.     < flexmdi:MDICanvas   id = "mdiCanvas"   horizontalScrollPolicy = "off"   verticalScrollPolicy = "off"   
  25.         width = "100%"   height = "100%"   backgroundColor = "#FFFFFF"   backgroundAlpha = "0"   effectsLib = "flexmdi.effects.effectsLib.MDIVistaEffects" >   
  26.         < flexmdi:MDIWindow   id = "win1"   
  27.             title = "Window 1 has a really really long title to show support for truncation"   
  28.             x = "30"   y = "30"   width = "400"   height = "200"   />   
  29.         < flexmdi:MDIWindow   id = "win2"   
  30.             title = "Window 2"   
  31.             x = "450"   y = "30"   width = "250"   height = "300"   />   
  32.     </ flexmdi:MDICanvas >   
  33. </ mx:Application >   
Xml代码 复制代码  收藏代码
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <!--flexmdi针对样式、效果常用功能的简化例子-->  
  3. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:flexmdi="http://flexmdi.googlecode.com/">  
  4.     <mx:Script>  
  5.         <![CDATA[  
  6.             private function createWin():void{  
  7.                 var win:MDIWindow = new MDIWindow();  
  8.                 win.width = 350;  
  9.                 win.title = "Window " + String(mdiCanvas.windowManager.windowList.length + 1);  
  10.                 mdiCanvas.windowManager.add(win);  
  11.             }  
  12.         ]]>  
  13.     </mx:Script>  
  14.     <mx:Style>  
  15.         MDIWindow{   
  16.             backgroundColor:#000000;   
  17.             backgroundAlpha:0.9;   
  18.             borderColor: #000000;   
  19.             borderAlpha: 0.7;   
  20.             headerHeight:22;   
  21.          }   
  22.     </mx:Style>  
  23.     <mx:Button id="showWin" label="创建窗体" click="createWin()"/>  
  24.     <flexmdi:MDICanvas id="mdiCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off"  
  25.         width="100%" height="100%" backgroundColor="#FFFFFF" backgroundAlpha="0" effectsLib="flexmdi.effects.effectsLib.MDIVistaEffects">  
  26.         <flexmdi:MDIWindow id="win1"  
  27.             title="Window 1 has a really really long title to show support for truncation"  
  28.             x="30" y="30" width="400" height="200" />  
  29.         <flexmdi:MDIWindow id="win2"  
  30.             title="Window 2"  
  31.             x="450" y="30" width="250" height="300" />  
  32.     </flexmdi:MDICanvas>  
  33. </mx:Application>  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值