简体   繁体   中英

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. My question is how can i use popup for editing selected record of datagrid instead of changing state. please give me any example with code that describe how pop ups can be used in flex 3 application.

I got answer for above problem. First we have to create custom component for popup named 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:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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