Flex Gumbo中如何通过contentBackgroundColor样式设置FxList背景颜色的例子

By Minidxer | July 14, 2009

接下来的例子演示了Flex Gumbo中如何通过contentBackgroundColor样式,设置FxList背景颜色。

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


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

Download: main.mxml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FxApplication name="FxList_contentBackgroundColor_test"
  3.         xmlns="http://ns.adobe.com/mxml/2009"
  4.         backgroundColor="white">
  5.  
  6.     <ApplicationControlBar dock="true" width="100%">
  7.         <Form styleName="plain">
  8.             <FormItem label="contentBackgroundColor:">
  9.                 <ColorPicker id="colorPicker"
  10.                         selectedColor="white" />
  11.             </FormItem>
  12.             <FormItem label="enabled:">
  13.                 <FxCheckBox id="checkBox"
  14.                         selected="true" />
  15.             </FormItem>
  16.         </Form>
  17.     </ApplicationControlBar>
  18.  
  19.     <FxList id="list"
  20.             contentBackgroundColor="{colorPicker.selectedColor}"
  21.             enabled="{checkBox.selected}"
  22.             horizontalCenter="0"
  23.             verticalCenter="0">
  24.         <dataProvider>
  25.             <ArrayCollection source="[One,Two,Three,Four,Five,Six]" />
  26.         </dataProvider>
  27.     </FxList>
  28.  
  29. </FxApplication>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子

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

Search Posts