简体   繁体   English

如何在 flex 3 中创建和使用弹出窗口 window?

[英]How to create and use popup window in flex 3?

I have used a datagrid and one button in control bar.我在控制栏中使用了一个数据网格和一个按钮。 by clicking button the application goes edit state from base state.通过单击按钮,应用程序从基础 state 开始编辑 state。 My question is how can i use popup for editing selected record of datagrid instead of changing state.我的问题是如何使用弹出窗口来编辑数据网格的选定记录,而不是更改 state。 please give me any example with code that describe how pop ups can be used in flex 3 application.请给我任何描述如何在 flex 3 应用程序中使用弹出窗口的代码示例。

I got answer for above problem.我得到了上述问题的答案。 First we have to create custom component for popup named MyPopup首先,我们必须为名为 MyPopup 的弹出窗口创建自定义组件

And in application:在应用中:

import components.popups.MyPopup;
public var pop:MyPopup;
public function Show_Pop():void
            {

             pop= PopUpManager.createPopUp(this,MyPopup,true)  as MyPopup;
             PopUpManager.centerPopUp(pop);

             }

calling function:调用 function:

<mx:Button  click="Show_Pop()" id="btn1" label="show Popup"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM