Flex Gumbo中如何通过layout属性设置FxList布局方向的例子

By Minidxer | July 15, 2009

接下来的例子演示了Flex Gumbo中如何通过在layout属性中设置VerticalLayout对象或HorizontalLayout对象以及TileLayout对象,设置FxList布局方向。

让我们先来看一下Demo可以点击这里察看源代码):


下面是完整代码(或点击这里察看):

Download: main.mxml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FxApplication name="FxList_layout_test"
  3.         xmlns="http://ns.adobe.com/mxml/2009"
  4.         backgroundColor="white">
  5.  
  6.     <FxList id="list"
  7.             horizontalCenter="0"
  8.             verticalCenter="0"
  9.             width="150"
  10.             height="100">
  11.         <dataProvider>
  12.             <ArrayCollection>
  13.                 <String>1. The</String>
  14.                 <String>2. Quick</String>
  15.                 <String>3. Brown</String>
  16.                 <String>4. Fox</String>
  17.                 <String>5. Jumps</String>
  18.                 <String>6. Over</String>
  19.                 <String>7. The</String>
  20.                 <String>8. Lazy</String>
  21.                 <String>9. Dog</String>
  22.             </ArrayCollection>
  23.         </dataProvider>
  24.     </FxList>
  25.  
  26. </FxApplication>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子

Topics: FxList, Gumbo | No Comments » | Tags: , , , ,

Search Posts