开发者

How to create and use popup window in flex 3?

开发者 https://www.devze.com 2023-03-22 08:20 出处:网络
I have used a datagrid and one button in control bar. by clicking button the application goes edit state from base state.

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 exam开发者_JAVA百科ple 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"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消