Macromedia flex builder-using flex builder User Manual

Page of 158
48
Chapter 2:  Flex Builder Tutorials
4.
Press Enter to accept your change and close the Quick Tag Editor.
5.
Insert a ControlBar container by clicking inside the Panel container and 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.
6.
With the insertion point still blinking in the ControlBar container, specify the value for the 
following property in the Attributes panel:
Common > id
ctrl
7.
Save the component file in the fbComponents folder by pressing Control+S and naming the 
component file as follows:
CartView.mxml
In Design view, the component’s layout should look similar to the following figure if you select 
the Panel container:
Add the product list to the shopping cart
According to the mock-up, the component should display a list of products the user wants to 
bring to the checkout area for purchase. The list should include the quantity and price of each 
product. You decide to use a DataGrid component for this task. 
1.
Make sure the component file, CartView.mxml, is open in Flex Builder.
2.
Insert a DataGrid by clicking anywhere inside the Panel container and clicking the DataGrid 
button in the Controls category of the Insert bar.
The DataGrid dialog box appears.