Skip navigation
Currently Being Moderated

How do you resize a Extension after creation

Aug 11, 2011 6:19 AM

Hi,

 

I've created a panel that is 200x200, but now I want it to load at 400x350, how can I changed the size the panel loads. I saw that you enter a height and width when first creating the panel (via the wizard), but I can't change the height/width set in the manifest.xml.

 

Stephen

 
Replies
  • Currently Being Moderated
    Aug 11, 2011 6:28 AM   in reply to stevoad

    You can change the width and height defined in the manifest using the Bundle Manifest Editor.

     

    Right click the project and go to CS Extension Builder > Bundle Manifest Editor, then in the editor click the Extension tab at the bottom.

     

    Then click User Interface and you can edit the default width/height, as well as other UI properties.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 9, 2011 11:22 AM   in reply to david_a_clark

    What if you wanted to do it dynamically?  Lets say that (during creation) the number of fields in your panel chenged from load to load and you wanted the panel size to change with the number of fields?

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 9, 2011 11:26 AM   in reply to TheDollarBill

    Then you can use CSXSWindowedApplication as your MXML root component, and set the width and height properties on it. CSXSWindowedApplication is delivered in CSXSLibrary.

     

    There are examples of how to CSXSWindowedApplication across the forum, e.g. http://forums.adobe.com/message/3487857#3487857

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 9, 2011 12:07 PM   in reply to david_a_clark

    THANKS! And forgive my ignorance, but:

       When I switch to a CSXSWindowedApplication the "addchild" method that I use to dynamically create UI controls becomes "undefined".  I wonder why?  If I switch to purely WindowedApplication (which guess CXSXWindowedApplication inherits from), the "addchild" method remains defined and I am able to modify the size of the panel with "this.height" as in the example you linked to.  So, my problems appeared to be solved by using a WindowedApplication, but I wanted to write and ask the difference between WindowedApplication and CSXSWindowedApplication to make sure I wasn't doing anything sacrilegious.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 9, 2011 12:15 PM   in reply to TheDollarBill

    You should not use WindowedApplication for extensions - it causes memory leaks (your extension, which is actually a Flex sub-application, is not fully garbage collected when quit). The only difference between WindowedApplication and CSXSWindowedApplication is that the latter unhooks some event listeners that allow proper garbage collection, so you shouldn't see problems with addChild as far as I know.

     

    If you upload a minimal code sample that shows the problem that would be helpful

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 9, 2011 12:48 PM   in reply to david_a_clark

    Gotcha.  Thanks so much.  I am not very good at this and I failed to include the xmlns attribute that goes with the csxswindowedapplication tag.  SO MANY LETTERS!  Thanks, again.

    -Bill

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 1, 2012 11:25 PM   in reply to david_a_clark

    hi david_a_clark,

     

    It is possible to resize a extension  in case of Application mxml component having flex version 4.5.1?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 6, 2012 10:25 AM   in reply to nam1490

    That's not something I've tried. When you set the width or height of an Application you're only setting the size of the Flash stage. You'd also need to somehow resize the extension's NativeWindow too.

     

    You can get a handle on the NativeWindow like this:

     

    var nativeWindow:NativeWindow = systemManager.stage.nativeWindow;
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points