
Insert and position the blog reader controls 109
1. With your Lessons project selected in the Navigator view, select File > New > MXML
Application and create an application file called BlogReader.mxml.
2. Designate the BlogReader.mxml file as the default file to be compiled by right-clicking
(Control-click on Macintosh) the file in the Navigator view and selecting Set As Default
Application from the context menu.
3. In MXML editor’s Design mode, drag a Panel container into the layout from the Layout
category of the Components view, and then set the following Panel properties in the
Properties view:
■ Title: Blog Reader
■ Width: 475
■ Height: 400
■ X: 10
■ Y: 10
4. In the Design mode, add the following controls to the Panel container by dragging them
from the Components view:
■ DataGrid
■ Te xt A re a
■ LinkButton
5. Use the mouse to arrange the controls in the layout in a vertical, left-aligned column.
6. Select the DataGrid control and set the following properties:
■ Id: dgPosts
■ X: 20
■ Y: 20
■ Width: 400
7. Select the TextArea control and set the following properties:
■ X: 20
■ Y: 175
■ Width: 400
8. Select the LinkButton control and set the following properties:
■ Label: Read Full Post
■ X: 20
NOTE
For the purpose of these lessons, several application files are used in a single Flex
Builder project. However, it’s good practice to have only one MXML application file
per project.
Commenti su questo manuale