Flex中TitleWindow传值思路及实现(2)


<?xml version="1.0" encoding="utf-8"?>
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
close="closeHandler(event)" title="修改窗口">
<s:layout>
<s:BasicLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import mx.events.CloseEvent;
import mx.managers.PopUpManager;

/*关闭按钮函数*/
protected function closeHandler(event:CloseEvent):void
{
PopUpManager.removePopUp(this);
}

/*取消按钮函数*/
protected function cancelHandler(event:MouseEvent):void
{
PopUpManager.removePopUp(this);
}

]]>
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>

<mx:VBox horizontalAlign="center">
<mx:Form borderStyle="solid" borderColor="#CCCCCC">
<mx:FormHeading label="修改界面" fontSize="14"/>
<mx:FormItem label="学号:">
<s:TextInput/>
</mx:FormItem>
<mx:FormItem label="姓名:">
<s:TextInput/>
</mx:FormItem>
<mx:FormItem label="性别:">
<s:TextInput/>
</mx:FormItem>
<mx:FormItem label="年龄:">
<s:TextInput/>
</mx:FormItem>
</mx:Form>
<mx:HBox>
<s:Label/>
<s:Button label="修改"/>
<s:Label/>
<s:Button label="取消"/>
</mx:HBox>
</mx:VBox>
</s:TitleWindow>


3、设计结果

(1)初始化时

Flex中TitleWindow传值思路及实现

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wzwpgg.html