
121
10
CHAPTER 10
Create a Constraint-based
Layout
This lesson shows you how to create a constraint-based layout with Adobe Flex Builder. A
constraint-based layout ensures that the components in your user interface adjust
automatically when a user resizes the application window.
In this tutorial, you’ll complete the following tasks:
Set up your project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
Learn about constraint-based layouts in Flex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Insert and position the components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Define the layout constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Set up your project
Before you begin this lesson, perform the following tasks:
■ If not already done, create the Lessons project in Flex Builder. For more information, see
“Create the Lessons project” on page 101.
■ Ensure that the automatic build option is enabled in Flex Builder. This option is enabled
by default in the standalone configuration of Flex Builder but not in the plug-in
configuration. To enable it, select Project > Build Automatically.
NOTE
You can achieve the same behavior using nested layout containers. For more
information, see Chapter 15, “Using Layout Containers” in Flex 2 Developer’s Guide.
Kommentare zu diesen Handbüchern