
Tutorial: Creating a layout with Flex Builder
13
7.
Click anywhere in the new
<mx:Canvas>
tag, click the Refresh button on the Attributes tab,
and set the following properties in the Attributes tab:
■
Common > id
:
bottomCanvas
■
Size > height
:
208
■
Size > width
:
364
■
Size > widthFlex
:
1
■
Other > vScrollPolicy
:
off
8.
Switch back to Design view to inspect your layout.
Tip:
Press F4 to hide the workspace and maximize the Document window. Press F4 again to
restore the workspace.
9.
Save your work.
Add view buttons to the product catalog
The product catalog area of the layout gives the user two views of the products—a grid view and a
thumbnail view. According to the user interface mock-ups, the user should be able to switch views
by clicking view buttons at the lower edge of the catalog. For information about the user interface
mock-ups, see
“Review the approved user interface mock-ups” on page 7
.
After studying the mock-up, you decide to use the following containers to lay out the buttons:
•
A ControlBar container in the left Panel container to create a footer
•
An HBox container in the ControlBar container to position the buttons horizontally
You use the following steps to lay out and insert the buttons with Flex Builder.
1.
Make sure the flexstore.mxml file is open in Flex Builder.
2.
Insert a ControlBar container by clicking inside the lower edge of the Panel container (without
clicking inside the ViewStack container), and then clicking the ControlBar button in the
Containers category of the Insert bar.
Flex Builder inserts an empty ControlBar container and automatically positions it at the lower
edge of the Panel container.
3.
With the insertion point still blinking in the ControlBar container, specify the values for the
following properties in the Attributes panel:
■
Size > height
:
45
■
Styles > horizontalAlign
:
right
4.
Insert an HBox container by clicking anywhere inside the ControlBar container, and clicking
the HBox button on the Insert bar.
5.
With the insertion point still blinking in the HBox container, set the value for the following
property in the Attributes panel:
■
Styles > horizontalGap
:
0
Содержание FLEX-FLEX BUILDER
Страница 56: ...56 Flex Builder Tutorials...