问题描述
我的 Flex 3 应用程序有一些通过 PopUpManager 显示的模式对话框,但有时我希望其他视图组件知道显示了弹出窗口.PopUpManager 没有任何方法来实际检查弹出窗口是否存在.有没有其他方法可以在不编写自己的全局管理器的情况下在 flash/flex 中检测到这一点?
My Flex 3 application has some modal dialogs displayed via the PopUpManager, but there are times when I'd like other view components to know there is popup displayed. The PopUpManager doesn't have any method for actually checking the existence of popups. Is there any other way to detect this in flash/flex without writing my own global manager?
(即使有模态弹出窗口,systemManager.popUpChildren.numChildren == 0)
(also systemManager.popUpChildren.numChildren == 0 even when there's a modal popup)
干杯.
推荐答案
我认为这取决于您添加弹出窗口的方式,请查看文档:
I think it depends on the way you are adding the popup, check the documentation :
http://livedocs.adobe.com/flex/3/langref/mx/managers/PopUpManager.html
create or add popup 需要四个参数,第四个参数是一个子列表
create or add popup takes four parameters and fourth parameter is a child list
childList:String (default = null) —要添加的子列表弹出.之一PopUpManagerChildList.APPLICATION,PopUpManagerChildList.POPUP,或PopUpManagerChildList.PARENT(默认).
因此尝试将所有弹出窗口添加到特定的子列表中,然后调整列表的大小.
So try adding all the popup's to a particular child-list and then play around with the size of the list.
这篇关于Flex PopUpManager:如何检测模态弹出窗口的存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!