Chapter 4. Layout and containers
This chapter covers
- Absolute and automatic layout
- Constraint-based layout
- Variable and fixed sizing
- Containers
- Dynamic layout with Repeaters
Now that you’ve been introduced to ActionScript and can manipulate visual effects, let the fun continue! In this chapter we talk about the visual building blocks and the types of containers you can use to quickly create layouts in a Flex application.
Containers are the foundation on which all your visual components rely. They make it easy for you to group and position collections of visual components. Layout is hosted within these containers but is limited to a specific set of components within a given container. Often referred to as child objects of the host container, these components can be anything from buttons, tables, and graphics to even other containers.
It might make it easier to think of a container as a box. You can place items (including other boxes) within the box and define where they’re to be placed, with positioning specific to each item.
Nope, we’re not comparing video games, but we do need to call out an important aspect of developing in Flex 4. Halo components (also known as MX components) are the components (buttons, text fields, containers, and so on) that Flex 3 used exclusively, whereas with Flex 4 a new generation of such components called Spark components was introduced.