Open popup in flex

You can use import mx.managers.PopUpManager to manage popups in your flex applications.

Import popup manager class by importing it.

import mx.managers.PopUpManager;

To open the poup first you have to create the instance of the control you want to show on popup and add it to the popup manager.

Here is the code to do so. Here i have created a custom control where all the child controls are wrapped into.

//Decalre the custom control

var myControl:MyCustomControl;

//Open up the custom control in the popup. 

 var myControl:MyCustomContro = new MyCustomControl();

//Add control to the popup manager to show

 PopUpManager.addPopUp(myControl,this,true);

//Center the popup control 

 PopUpManager.centerPopUp(myControl);
, ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Share to Facebook Share to Twitter Stumble It Share on Tumblr Digg More...