
CHAPTER 4
Flex Controls and Layout
The first step in building a Flex application is to create the user
interface.
Flex not only has a rich set of controls. It also has a
complete set of layout mechanisms that make it easy to build
user interfaces that look good and can scale appropriately as
the display area of the Flash application is resized.
This chapter covers both layout mechanisms and controls. We
will start by covering the layout mechanisms, and then we will
discuss the available controls.
The Application Container
At the root of a Flex application is a single container, called the
Application container, which holds all other containers and
components. The Application container lays out all its children
vertically by default (when the layout property is not specifi-
cally defined). There are three possible values for the Applica
tion component’s layout property:
vertical
Lays out each child component vertically from the top of
the application to the bottom in the specified order
horizontal
Lays out each child component horizontally from the left
of the application to the right in the specified order
37
Commenti su questo manuale