1 Reply Latest reply on Aug 17, 2006 6:40 PM by Josh Johnson

    PopUp TitleWindow in MXML

    Josh Johnson
      So in my application, I want to make it possible to doubleClick an item in a DataGrid, and open a new window, where lots of information about that item can be displayed. (nothing Earth shattering, I know). I've been able to use Action Script to open the new window (only using Click so far) but I did this using an Action Script, where all the attributes of the window are in Action Script as well. That's fine for something simple like a quick dialog, but this window is going to be VERY detailed, and it would be much less cumberson to define it in. Is there any way to simply describe the window object in MXML, and then have that window automatically opened based on a simple tag in the main MXML. (Not everyone's a Flash/AS3 programmer)
        • 1. Re: PopUp TitleWindow in MXML
          Josh Johnson Level 1
          Doh. Right after writing this, as I was researching the close button on a titleWindow I ran across this example where the entire title window is specified in an external MXML file. Exactly what I wanted...


          <?xml version="1.0" encoding="utf-8"?>
          <!-- Simple example to demonstrate TitleWindow layout -->
          <mx:TitleWindow xmlns:mx=" http://www.macromedia.com/2003/mxml" title="Title Window"
          x="268" y="86" closeButton="true" click="this.deletePopUp();" width="200" height="180">
          <mx:Label text="Enter Name: "/>
          <mx:TextInput id="email" width="150"/>
          <mx:Button label="Cancel" click="this.deletePopUp();"/>


          <?xml version="1.0" encoding="utf-8"?>
          <!-- Simple application to demonstrate TitleWindow layout -->
          <mx:Application xmlns:mx=" http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF">

          function showWindow()
          var login=mx.managers.PopUpManager.createPopUp( this, SimpleTitleWindowExample, true);
          <mx:Panel title="Simple Panel">
          <mx:Button label="Click to view title window" click="showWindow();"/>