【转】Popup窗口访问父窗口的5种方法以及相互传值








弹出窗口:






4.owner属性: owner:DisplayObjectContainer [read-write] UIComponent的owner属性默认是这个UIComponent的父组件. However, if this UIComponent object is a child component that is popped up by its parent, such as the dropdown list of a ComboBox control, the owner is the component that popped up this UIComponent object. This property is not managed by Flex, but by each component. Therefore, if you use the PopUpManger.createPopUp() or PopUpManger.addPopUp() method to pop up a child component, you should set the owner property of the child component to the component that popped it up. The default value is the value of the parent property. 我也不翻译了- -说真的我看到了感觉很囧。owner这个属性在Popup中没有用途,因此,可以在创建窗口的时候将子窗口的owner设置成父窗口(也就是当时的this),然后子窗口访问自己的owner属性即可。 父窗口代码:PopUpDemo.mxml





弹出窗口代码:titlewindow.mxml





5、 利用callback函数实现子窗口调用父窗口的函数 假设有父窗体P,在父窗体中弹出子窗体C,进行必要的操作

转载于:https://my.oschina.net/u/263424/blog/633449

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值