6 Replies Latest reply on Aug 26, 2010 10:43 AM by dougieweb

    Panel as "application" wise or unwise?


      I have an application that uses a lot of panels (from six to twelve at any one time).  Because my experience is that the panel is very useful, flexible and convenient thing, I'm thinking about wrapping the panels within a "large" panel because I like the way you can control the panel layout in the browser (espeecially with contraints).  I was not able to contrain the other layout components such as s:Group as easily. 

      What is your experience, or caution?



        • 1. Re: Panel as "application" wise or unwise?
          Gregory Lafrance Level 6

          In that case use a Canvas as the outer-most container housing the other Panels, as it is mire light-weight.


          If this post answers your question or helps, please mark it as such.

          Greg Lafrance - Flex 2 and 3 ACE certified


          Flex Training and Support Services

          • 2. Re: Panel as "application" wise or unwise?
            dougieweb Level 1

            Thanks Greg - I noticed that once I used the Canvas layout, and added BasicLayout, I could use the contraint capability.  Thanks for the "lightweight" informatino as well.  I guess I was thinking that it was taboo to use mx based things with spark-based things.



            • 3. Re: Panel as "application" wise or unwise?
              Devtron Level 3

              Are you not using an Application tag? Is that even possible (I dont know?)?


              The Application tag Vs. Panel tag question really was hard for me to understand when begininng with FLEX 1 month ago.


              All FLEX examples on the web make use of the Application tag. It is not possible to use multiple Application tags if you do not code to handle that with ApplicationLoader, and dynamically loading SWF files (yuck yuck yuck).


              The Application tag is important, but you could wrap your panels in a Canvas, as previously mentioned!


              I would not use a Panel to wrap child panels with, I like to distinguish them apart.

              1 person found this helpful
              • 4. Re: Panel as "application" wise or unwise?
                dougieweb Level 1

                Sorry for the unclarity.  I am using an application tag.  Then I was putting everyting inside a Panel - mainly so that I could use contraint-based layout.  However, someone told me that the Canvas can be used for contraint-based and that futhermore it is more lightweight.  I tried it and it worked.  I'm no longer going to use the Panel to wrap the whole application.

                • 5. Re: Panel as "application" wise or unwise?
                  Devtron Level 3

                  Sweet. I need to actually do the same thing. I have most of my application in Panels and Groups, but would rather use the Canvas as I got hip to that recently myself

                  1 person found this helpful
                  • 6. Re: Panel as "application" wise or unwise?
                    dougieweb Level 1

                    Yes, the Canvas worked out well.  However, I noticed that when I hovered over the <mx:Canvas> tag in my Flash Builder editor, it recommended using an <s:BorderContainer> instead.  I tried the BorderContain and it work.  I suppose the reason that the system recommended the BorderContainer is because it is a spark-based thing and the story seems to be that we should use spark whenever possible.