Flex Gumbo中如何通过columnCount, columnWidth, rowCount以及rowHeight属性设置FxList行数与列数的例子

By Minidxer | July 17, 2009

接下来的例子演示了Flex Gumbo中如何通过columnCount, columnWidth, rowCount以及rowHeight属性,设置FxList行数与列数。

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


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

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

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

Search Posts