Chapter 8. LAYING OUT YOUR APPLICATIONS
Having a mechanism for layout is yet another one of the great features of Flex. If you’ve ever developed applications using the Flash integrated development environment (IDE), you know that layout can be one of the greatest challenges. Sometimes you will be developing something that works fine with a static size. In that case, it’s okay if all of its components are set to one location and one size, never needing to resize or reposition themselves. For this, the Flash IDE has worked great. More often than not, however, you’ll want more flexibility in your layout, and Flex provides this.
With today’s multitude of screen resolutions, having a layout that can expand is often essential. If someone is viewing your application in a browser, they can resize their browser. If your application is deployed to the desktop with AIR, you’ll probably want the ability to resize that window as well. You may even want to be able to move components around based on the size of the application.
The Flex layout system is built using the web paradigm of layers and constraints, so having a background in web design or development doesn’t hurt. However, Flex Builder’s Design mode will help you build a beautiful layout, even if you’ve never heard of Cascading Style Sheets (CSS).
Types of Layouts
You can lay out components in your application in many ways. You can use coordinates, layout containers, constraints, or a mixture of all three to find the perfect layout.
Absolute ...
Get Learning Flex 3 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.