将自定义组件放置在 Flex 4 中的 PopUp 窗口上(由 PopUpManager 调用)
如何在 PopUpManager 创建的 Popup 上显示自定义组件(在应用程序级别声明)?
在应用程序 mxml 中,我有以下代码片段:
private var myCustomComp:CustomComp = new CustomComp;
/** Called on by an event listener **/
protected function showCustomComp(event:MyEvent):void
{
myCustomComp.visible = true;
// place PopUpManager windows
this.setElementIndex(virtualKeyboard,this.numElements-1); // Also tried with 0 instead of numElements-1, but nothing!
}
弹出窗口的调用方式如下:
PopUpManager.addPopUp(myPopup,FlexGlobals.topLevelApplication as DisplayObject,true, PopUpManagerChildList.APPLICATION);
无论如何,myCustomComp 不会显示在 PopUpManager 调用的任何窗口上。是否有任何快捷方式或者我应该使 myCustomComp 成为从 PopUpManager 调用的 PopUp 本身,以便它可以位于顶部?
你能给我一个提示吗?谢谢!
How can I display a custom component (declared at the Application level) over a Popup created by the PopUpManager?
At the Application mxml, I've the following pieces of code:
private var myCustomComp:CustomComp = new CustomComp;
/** Called on by an event listener **/
protected function showCustomComp(event:MyEvent):void
{
myCustomComp.visible = true;
// place PopUpManager windows
this.setElementIndex(virtualKeyboard,this.numElements-1); // Also tried with 0 instead of numElements-1, but nothing!
}
The Popup window is called like this:
PopUpManager.addPopUp(myPopup,FlexGlobals.topLevelApplication as DisplayObject,true, PopUpManagerChildList.APPLICATION);
Anyway, myCustomComp is not showing over any window called by the PopUpManager. Is there any shortcut or should I make myCustomComp a PopUp itself called from the PopUpManager so it could be on top?
Could you give me a hint? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个,
这应该会弹出 ua。告诉我,如果您仍然遇到任何问题
Try this,
This should give u a popup. Tell me, if u are still facing any problem