Flex Gumbo中如何通过selectedIndex属性设置FxButtonBar选中索引的例子
By Minidxer | July 12, 2009
接下来的例子演示了Flex Gumbo中如何通过selectedIndex属性,设置FxButtonBar选中索引。
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <Application name="FxButtonBar_selectedIndex_test"
- xmlns="http://ns.adobe.com/mxml/2009"
- layout="vertical"
- verticalAlign="middle"
- backgroundColor="white">
- <ApplicationControlBar dock="true">
- <Form styleName="plain">
- <FormItem label="requiresSelection:">
- <FxCheckBox id="checkBox" />
- </FormItem>
- <FormItem label="selectedIndex:"
- direction="horizontal">
- <FxHSlider id="slider"
- minimum="-1"
- maximum="5"
- liveDragging="true" />
- <Label text="{btnBar.selectedIndex}" />
- </FormItem>
- </Form>
- </ApplicationControlBar>
- <FxButtonBar id="btnBar"
- selectedIndex="@{slider.value}"
- requiresSelection="{checkBox.selected}">
- <dataProvider>
- <ArrayCollection source="[One,Two,Three,Four,Five,Six]" />
- </dataProvider>
- </FxButtonBar>
- </Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
FxButtonBar, Gumbo |
1 Comment » |
Tags: Gumbo, requiresSelection, selectedIndex
Trackbacks