Chapter 9. Designing Application Layouts

IN THIS CHAPTER

Types of Layouts

The Display List

Sizing

Controlling Whitespace in the Layout

Advanced Containers

Spacers and Lines

Alignment

Constraints-Based Layout

Summary

“The Chinese workingmen, hanging in their baskets, had to bore the holes with their small hand-drills, then tamp in the explosives, set and light the fuse, and holler to be pulled out of the way.”

Stephen Ambrose Nothing Like It in the World

Fortunately for us, creating a Flex application does not involve life-threatening hazards, but like with any construction project, some planning is necessary.

Engineered projects can be judged by their structural integrity—the wall is plumb, the bridge supports, the dam holds. Similarly, your applications stand to gain from effective planning—the design is lightweight, the content is well arranged, the interface is intuitive.

One situation brought upon by today’s multitude of screen resolutions is the need to develop a layout that can expand and contract. If someone is viewing an application in a web browser, she can resize her browser. How will your layout react? You should anticipate and make an effort to accommodate this scenario.

Flex development provides a number of approaches for arranging Flex applications. You can use precise coordinate positioning, or you can use relative positioning (i.e., vertical/horizontal). You can also use constraints to force components into positions relative to a container’s center or its edges. Most often, ...

Get Learning Flex 4 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.