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

  • 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 61
Figure 4-7. A form-based layout
Combined Layouts
Containers
can hold other containers. You can nest them to
create sophisticated layouts, and you can create custom com-
ponents that are made up of existing components. Exam-
ple 4-8 shows an example of a complex nested layout. You
should take care to use these container classes wisely and not
to overuse them. Using too many nested containers can be the
cause of performance problems in your application.
Example 4-8. A complex nested layout
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="#000000" layout="horizontal"
horizontalGap="25">
<mx:Style> Panel { backgroundAlpha: 1; borderAlpha: 1;
headerColors: #c7c7c7, #ffffff;
footerColors: #ffffff, #c7c7c7;
paddingTop: 15; paddingRight: 15;
paddingLeft: 15; paddingBottom: 15;
shadowDirection: "right"; }
.header { color: #ffffff; fontSize: 15;
fontWeight: "bold"; }</mx:Style>
<mx:VBox verticalGap="10">
<mx:Panel title="Featured Photograph">
<mx:Image source="assets/animals03.jpg" horizontalCenter="0"
46 | Chapter 4:Flex Controls and Layout
Zobrazit stránku 61
1 2 ... 57 58 59 60 61 62 63 64 65 66 67 ... 147 148

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

Žádné komentáře