Flex Gumbo中如何通过includeIn和excludeFrom给应用固定特定字符串的例子

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2009/02/24/hiding-specific-items-in-a-data-provider-based-on-the-current-application-state-in-flex-gumbo/ -->
<FxApplication name="String_includeIn_test"
        xmlns="http://ns.adobe.com/mxml/2009"
        backgroundColor="white">

    <states>
        <State name="one" />
        <State name="two" />
        <State name="three" />
    </states>

    <ApplicationControlBar>
        <Form styleName="plain">
            <FormItem label="currentState:">
                <Label text="{currentState}" />
            </FormItem>
            <FormItem direction="horizontal">
                <FxButton label="State one"
                        click="currentState='one';" />
                <FxButton label="State two"
                        click="currentState='two';" />
                <FxButton label="State three"
                        click="currentState='three';" />
            </FormItem>
        </Form>
    </ApplicationControlBar>

    <FxList id="list"
            horizontalCenter="0"
            bottom="40">
        <dataProvider>
            <ArrayCollection>
                <String>1. The</String>
                <String>2. Quick</String>
                <String>3. Brown</String>
                <String includeIn="one">4. Fox</String>
                <String includeIn="two">5. Jumps</String>
                <String includeIn="one,two">6. Over</String>
                <String excludeFrom="one">7. The</String>
                <String excludeFrom="two">8. Lazy</String>
                <String excludeFrom="one,two">9. Dog</String>
            </ArrayCollection>
        </dataProvider>
    </FxList>

</FxApplication>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值