Flex中TitleWindow传值思路及实现

随心笔谈1年前 (2023)发布 admin
118 0

xmlns:s=”library://ns.adobe.com/flex/spark”

xmlns:mx=”library://ns.adobe.com/flex/mx” minWidth=”955″ minHeight=”600″>

import mx.collections.ArrayCollection;

[Bindable]

//表格数据源绑定

private var grid:ArrayCollection=new ArrayCollection([

{number:”2014010101″,name:”张三”,sex:”男”,age:”19″},

{number:”2014010102″,name:”李思”,sex:”女”,age:”20″},

{number:”2014010103″,name:”蔡华”,sex:”男”,age:”21″},

{number:”2014010104″,name:”牛耳”,sex:”女”,age:”22″},

{number:”2014010105″,name:”兆司”,sex:”男”,age:”18″},

{number:”2014010106″,name:”胡柳”,sex:”女”,age:”19″},

{number:”2014010107″,name:”刘斯”,sex:”男”,age:”20″},

{number:”2014010108″,name:”孙阳”,sex:”女”,age:”22″},

{number:”2014010109″,name:”郑武”,sex:”男”,age:”21″},

{number:”2014010110″,name:”王雪”,sex:”女”,age:”20″},

{number:”2014010111″,name:”胡柳”,sex:”女”,age:”19″},

{number:”2014010112″,name:”刘斯”,sex:”男”,age:”20″},

{number:”2014010113″,name:”孙阳”,sex:”女”,age:”22″},

{number:”2014010114″,name:”郑武”,sex:”男”,age:”21″},

{number:”2014010115″,name:”王雪”,sex:”女”,age:”20″}

]);

]]>

import mx.managers.PopUpManager;

protected function addHandler(event:MouseEvent):void

{

var childWindow:ChildWindow=ChildWindow(PopUpManager.createPopUp(this,ChildWindow,true));

var point:Point=new Point(100,100);

childWindow.x=point.x + 400;

childWindow.y=point.y + 50;

}

protected function updateHandler(event:MouseEvent):void

{

var updateWindow:UpdateWindow=UpdateWindow(PopUpManager.createPopUp(this,UpdateWindow,true));

var point:Point=new Point(100,100);

updateWindow.x=point.x + 400;

updateWindow.y=point.y + 50;

updateWindow.stuNo=event.currentTarget.selectedItem.content;

}

]]>

© 版权声明

相关文章