Flex 3 popup forms - how to popup forms

Posted on 2009-05-10
Medium Priority
Last Modified: 2012-05-06
I am designing an application in flex 3, I fairly new so picking up as i go along.

I want to be able to popup a title window ,panel or tab navigator container when a button is pressed.

I will of course have many popups, so not sure how to deal with this

I have added the a button window popup below the application.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init();">
                  import mx.binding.utils.BindingUtils;
                  private function init():void
                        BindingUtils.bindSetter(setVS, accordion, "selectedIndex");      
                  private function setVS(selectedIndex:Number):void
                        VS_AllEnquires.selectedIndex = selectedIndex;
        <mx:Canvas x="5" y="10" id="Enquiries" label="Enquiries" width="100%" height="100%" borderStyle="solid">
                <mx:HBox borderStyle="inset" width="531" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5" height="34" y="10" x="10" backgroundColor="#585757" cornerRadius="10" dropShadowColor="#690F0F" dropShadowEnabled="true">
                        <mx:Button label="New Enquiry"/>
                        <mx:Button label="New Quote"/>
                        <mx:Button label="Appointment"/>
                <mx:HDividedBox x="10" y="52" width="531" height="260"  >
                        <mx:VDividedBox width="30%" height="100%">
                                <mx:Accordion id="accordion" width="100%" height="70%">
                                        <mx:Canvas label="Quotes" width="100%" height="100%">
                                        <mx:Canvas label="View2" width="100%" height="100%">
                                <mx:TextArea width="100%" height="30%"/>
                <mx:VDividedBox width="70%" height="100%">
                        <mx:ViewStack id="VS_AllEnquires" borderStyle="solid" width="100%" height="80%">
                                <mx:Canvas id="AllEnquiries" label="AllEnquiries" width="100%" height="100%">
                                        <mx:DataGrid id="DG_AllEnquiries" width="100%" height="100%">
                                                        <mx:DataGridColumn headerText="Enquiry Date" dataField="col1"/>
                                                        <mx:DataGridColumn headerText="Enquiry Source" dataField="col2"/>
                                                        <mx:DataGridColumn headerText="Personell" dataField="col3"/>
                                <mx:Canvas label="View2" width="100%" height="100%">
                        <mx:TextArea width="100%" height="20%"/>
                <mx:Panel x="10" y="329" width="250" height="200" layout="absolute" title="New Enquiry button Popup">
                        <mx:Button x="156" y="128" label="close"/>
                        <mx:Button x="92" y="128" label="save"/>
                <mx:Panel x="268" y="329" width="250" height="200" layout="absolute" title="Selected Data Grid Row Popup">

Open in new window

Question by:X-quisite
  • 2

Accepted Solution

Fuzzy_Logic_ earned 1000 total points
ID: 24350454
You need to use the 'PopUpManager'


Regards FL
 public function addPopUp():void
        var tw = new TitleWindow();
        tw.title = "My Title";
        mx.managers.PopUpManager.addPopUp(tw, pnl, false);

Open in new window


Author Comment

ID: 24350491

Thanks for the link,
I have sort of worked out how to use popup manager when a button is pressed.
However, i am not sure how to do it when a row is doubleclicked in a datagrid.
which event property of the datagrid should i use some sample code would be helpful.

LVL 19

Assisted Solution

Jones911 earned 1000 total points
ID: 24350859
On the datagrid add this:

On doubleclick it will call your popup function.
<mx:DataGrid id="myGrid" doubleClick="addPopup()" left="0" right="0" bottom="0" top="0" >

Open in new window


Author Closing Comment

ID: 31579947
Thank you both for putting me in the right direction

Featured Post

Become an IT Security Management Expert

In today’s fast-paced, digitally transformed world of business, the need to protect network data and ensure cloud privacy has never been greater. With a B.S. in Network Operations and Security, you can get the credentials it takes to become an IT security management expert.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
We can see that the frameworks like React Native and PhoneGap make the development process of the applications relatively less expensive and more accessible than the development would cost when written in the native language for the platform.
The video provides a quick and easy steps to migrate MBOX file to well known Outlook PST and Office 365. Besides this, it also supports and migrates more than 20 email clients of MBOX which include AppleMail, Opera, Thunderbird and SeaMonkey effortl…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question