MACROMEDIA FLEX-GETTING STARTED WITH FLEX Uživatelský manuál Strana 58

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 148
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 57
Example 4-5
is some sample code for an absolutely positioned
layout.
Example 4-5. An absolutely positioned layout
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" backgroundColor="#FFFFFF"
backgroundAlpha="0">
<mx:Canvas x="23" y="34">
<mx:Button label="&lt; prev" x="4" y="97" />
<mx:Image source="assets/animals03.jpg" x="85" y="4" />
<mx:Label text="Photographed by Elsie Weil" x="85"
y="230" />
<mx:Button label="next &gt;" x="381" y="97" />
</mx:Canvas>
</mx:Application>
Figure 4-5 shows the result.
The Canvas Container (Relative Positioning)
With relative positioning, also called constraint-based layout,
you can anchor the sides or center of a component to positions
which are relative to the component’s container. The size and
position of the components change when the user resizes the
Figure 4-4. A combination VBox and HBox layout
42 | Chapter 4:Flex Controls and Layout
Zobrazit stránku 57
1 2 ... 53 54 55 56 57 58 59 60 61 62 63 ... 147 148

Komentáře k této Příručce

Žádné komentáře