MACROMEDIA FLEX-GETTING STARTED WITH FLEX Instrukcja Użytkownika Strona 57

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 148
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 56
strating that container controls can have other containers as
children.
Example 4-4. Using both the VBox and the HBox containers
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="#FFFFFF" backgroundAlpha="0">
<mx:VBox horizontalAlign="center" verticalGap="15">
<mx:HBox verticalAlign="middle" horizontalGap="15">
<mx:Button label="&lt; prev" left="10" top="120" />
<mx:Image source="assets/animals03.jpg"
horizontalCenter="0" top="30"/>
<mx:Button label="next &gt;" right="10" top="120"/>
</mx:HBox>
<mx:Label text="Photographed by Elsie Weil"
horizontalCenter="0" top="250"/>
</mx:VBox>
</mx:Application>
Figure 4-4 shows the result of Example 4-4.
The Canvas Container (Absolute Positioning)
Canvas is
the only container that lets you explicitly specify the
location of its children within the container. The Canvas object
has only one layout value: absolute. You can use the x and y
properties of child components for pixel-perfect layouts. If the
display window is resized, the child components stay fixed in
place and may appear cut off. Using absolute positioning you
can make child controls overlap if desired.
Figure 4-3. An HBox layout
The Canvas Container (Absolute Positioning) | 41
Przeglądanie stron 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 147 148

Komentarze do niniejszej Instrukcji

Brak uwag