Flex Gumbo中如何利用horizontalAlign属性设置FxList横向对齐方式的例子
By Minidxer | July 17, 2009
接下来的例子演示了Flex Gumbo中如何利用horizontalAlign属性,设置FxList横向对齐方式。
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <Application name="FxList_layout_VerticalLayout_horizontalAlign_test"
- xmlns="http://ns.adobe.com/mxml/2009"
- backgroundColor="white">
- <ApplicationControlBar dock="true">
- <Form styleName="plain">
- <FormItem label="horizontalAlign:">
- <ComboBox id="comboBox"
- dataProvider="[left,center,right,justify,contentJustify]"
- selectedIndex="4" />
- </FormItem>
- </Form>
- </ApplicationControlBar>
- <FxList id="list" width="200">
- <layout>
- <VerticalLayout gap="0"
- horizontalAlign="{comboBox.selectedItem}"
- requestedRowCount="6" />
- </layout>
- <dataProvider>
- <ArrayCollection>
- <String>1. The</String>
- <String>2. Quick</String>
- <String>3. Brown</String>
- <String>4. Fox</String>
- <String>5. Jumps</String>
- <String>6. Over</String>
- <String>7. The</String>
- <String>8. Lazy</String>
- <String>9. Dog</String>
- </ArrayCollection>
- </dataProvider>
- </FxList>
- </Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
FxList, Gumbo |
No Comments » |
Tags: Gumbo, horizontalAlign