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

By Minidxer | July 30, 2009

接下来的Flex Gumbo中如何通过orientation属性,设置FxList布局。



下面是main.mxml:

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FxApplication name="FxList_layout_TileLayout_orientation_test"
  3.         xmlns="http://ns.adobe.com/mxml/2009">
  4.  
  5.     <Declarations>
  6.         <ArrayList id="arrList1">
  7.             <Image source="images/ai_appicon-tn.gif" />
  8.             <Image source="images/air_appicon-tn.gif" />
  9.             <Image source="images/cf_appicon-tn.gif" />
  10.             <Image source="images/dw_appicon-tn.gif" />
  11.             <Image source="images/fl_appicon-tn.gif" />
  12.             <Image source="images/fl_player_appicon-tn.gif" />
  13.             <Image source="images/fw_appicon-tn.gif" />
  14.             <Image source="images/fx_appicon-tn.gif" />
  15.         </ArrayList>
  16.     </Declarations>
  17.  
  18.     <Form>
  19.         <FormItem label="orientation:">
  20.             <DropDownList id="dropDownList" width="100">
  21.                 <dataProvider>
  22.                     <ArrayList source="[columns,rows]" />
  23.                 </dataProvider>
  24.             </DropDownList>
  25.         </FormItem>
  26.         <FormItem>
  27.             <FxList id="list1"
  28.                     dataProvider="{arrList1}"
  29.                     skinClass="skins.CustomFxListSkin"
  30.                     horizontalCenter="0"
  31.                     verticalCenter="0">
  32.                 <layout>
  33.                     <TileLayout columnCount="3"
  34.                             rowCount="2"
  35.                             horizontalGap="0"
  36.                             verticalGap="0"
  37.                             orientation="{dropDownList.selectedItem}" />
  38.                 </layout>
  39.             </FxList>
  40.         </FormItem>
  41.     </Form>
  42.  
  43. </FxApplication>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子

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

Search Posts