MACROMEDIA FLEX-GETTING STARTED WITH FLEX Manuale Utente Pagina 55

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 148
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 54
The Box Class
The Box class is the base class for the VBox and HBox classes:
The VBox container renders all child display objects verti-
cally.
The HBox container renders all child display objects hori-
zontally.
The Application object behaves like a VBox by default (vertical
layout), but you can also set it to use absolute or horizontal
layout.
VBox and HBox flow like HTML, only in one direction.
Example 4-2 shows the default layout method used by the
VBox container (vertical).
Example 4-2. Using the VBox container
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="#FFFFFF" backgroundAlpha="0">
<mx:VBox>
<mx:Button label="&lt; prev" left="10" top="120" />
<mx:Image source="assets/animals03.jpg" horizontalCenter="0"
top="30"/>
<mx:Label text="Photographed by Elsie Weil"
horizontalCenter="0" top="250"/>
<mx:Button label="next &gt;" right="10" top="120"/>
</mx:VBox>
</mx:Application>
Figure 4-2 shows the result of this code.
The Box Class | 39
Vedere la pagina 54
1 2 ... 50 51 52 53 54 55 56 57 58 59 60 ... 147 148

Commenti su questo manuale

Nessun commento