---导入flexMdi.swc (http://code.google.com/p/flexmdi/);---
----测试代码----
----测试代码----
- <? xml version = "1.0" encoding = "utf-8" ?>
- <!--flexmdi针对样式、效果常用功能的简化例子-->
- < mx:Application xmlns:mx = "http://www.adobe.com/2006/mxml" layout = "vertical" xmlns:flexmdi = "http://flexmdi.googlecode.com/" >
- < mx:Script >
- <![CDATA[
- private function createWin():void{
- var win:MDIWindow = new MDIWindow();
- win.width = 350;
- win.title = "Window " + String(mdiCanvas.windowManager.windowList.length + 1);
- mdiCanvas.windowManager.add(win);
- }
- ]]>
- </ mx:Script >
- < mx:Style >
- MDIWindow{
- backgroundColor:#000000;
- backgroundAlpha:0.9;
- borderColor: #000000;
- borderAlpha: 0.7;
- headerHeight:22;
- }
- </ mx:Style >
- < mx:Button id = "showWin" label = "创建窗体" click = "createWin()" />
- < flexmdi:MDICanvas id = "mdiCanvas" horizontalScrollPolicy = "off" verticalScrollPolicy = "off"
- width = "100%" height = "100%" backgroundColor = "#FFFFFF" backgroundAlpha = "0" effectsLib = "flexmdi.effects.effectsLib.MDIVistaEffects" >
- < flexmdi:MDIWindow id = "win1"
- title = "Window 1 has a really really long title to show support for truncation"
- x = "30" y = "30" width = "400" height = "200" />
- < flexmdi:MDIWindow id = "win2"
- title = "Window 2"
- x = "450" y = "30" width = "250" height = "300" />
- </ flexmdi:MDICanvas >
- </ mx:Application >
- <?xml version="1.0" encoding="utf-8"?>
- <!--flexmdi针对样式、效果常用功能的简化例子-->
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:flexmdi="http://flexmdi.googlecode.com/">
- <mx:Script>
- <![CDATA[
- private function createWin():void{
- var win:MDIWindow = new MDIWindow();
- win.width = 350;
- win.title = "Window " + String(mdiCanvas.windowManager.windowList.length + 1);
- mdiCanvas.windowManager.add(win);
- }
- ]]>
- </mx:Script>
- <mx:Style>
- MDIWindow{
- backgroundColor:#000000;
- backgroundAlpha:0.9;
- borderColor: #000000;
- borderAlpha: 0.7;
- headerHeight:22;
- }
- </mx:Style>
- <mx:Button id="showWin" label="创建窗体" click="createWin()"/>
- <flexmdi:MDICanvas id="mdiCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off"
- width="100%" height="100%" backgroundColor="#FFFFFF" backgroundAlpha="0" effectsLib="flexmdi.effects.effectsLib.MDIVistaEffects">
- <flexmdi:MDIWindow id="win1"
- title="Window 1 has a really really long title to show support for truncation"
- x="30" y="30" width="400" height="200" />
- <flexmdi:MDIWindow id="win2"
- title="Window 2"
- x="450" y="30" width="250" height="300" />
- </flexmdi:MDICanvas>
- </mx:Application>