1 Reply Latest reply on Feb 24, 2010 8:58 AM by Gregory Lafrance

    Better way to layout?

    msparker64

      Greetings and Salutations,

       

      I am fairly new to AIR, but have been programming OO apps for sometime. Currently I have an application which has Canvases inside of Canvases and HBoxes and VBoxes to perform layout. The application is running very slow and it was suggested that Canvases, VBoxes and HBoxes are heavy hitters. Is there a better way to layout a screen? For instance I am using a SuperTabNavigator. Each tab has a canvas on it. Within that canvas are a multitude of other canvases that represent real world objects (controlled by a repeater). Each of these canvases has a title and a multitude of canvases that represent actions against the real world object (also controlled by a repeater). These canvases use HBoxes and VBoxes to align the title of the action with a custom color bar (which is also in a canvas - but I'm switching this to a UIComponent). I have been programming in other OO languages and am used to having objects within objects to define layouts, etc. Apparently this isn't the right way to go with AIR. Any suggestions would be appreciated.

        • 1. Re: Better way to layout?
          Gregory Lafrance Level 6

          Basically you just need to understand what each container offers in terms of layout capabilities, and how to use properties such as paddingLeft, paddingRight, horizontalGap, etc. to help minimize nested containers.

           

          Bottom line, keep number of containers to a minimum, but use them enough to achieve your UI design goals.

           

          Also consider your UI design. Can it be simplified? Is something else in the app slowing it down?

           

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


          Greg Lafrance - Flex 2 and 3 ACE certified

          www.ChikaraDev.com

          Flex / AIR Development, Training, and Support Services

          1 person found this helpful