MACROMEDIA FLEX-GETTING STARTED WITH FLEX Manual do Utilizador Página 46

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 148
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 45
Example 3-13. The itemRenderer attribute
<mx:TileList width="100%" height="100%"
dataProvider="{photoFeed}">
<mx:itemRenderer>
</mx:itemRenderer>
</mx:TileList>
4. Now
we’ll create a layout component for the item ren-
derer. Within the itemRenderer property, add a Compo
nent component using the code shown in Example 3-14.
Example 3-14. Adding the Component
<mx:TileList width="100%" height="100%"
dataProvider="{photoFeed}">
<mx:itemRenderer>
<mx:Component
</mx:Component>
</mx:itemRenderer>
</mx:TileList>
5. To create the layout the item renderer will use, within
the Component add the VBox component with a width at-
tribute with a value of 125 and a height attribute with a
value of 125. Add paddingBottom, paddingLeft, padding
Top, and paddingRight attributes each with a value of 5.
The code is shown in Example 3-15.
Example 3-15. Adding the VBox
<mx:TileList width="100%" height="100%"
dataProvider="{photoFeed}">
<mx:itemRenderer>
<mx:Component>
<mx:VBox width="125” height="125”
paddingBottom="5”
paddingLeft="5”
paddingTop="5”
paddingRight="5">
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:TileList>
6. Within the VBox component, create an Image component.
Add a width attribute with a value of 75 and a height
30 | Chapter 3:Flex 101: Step by Step
Vista de página 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 147 148

Comentários a estes Manuais

Sem comentários