flex 侧面可以选择性隐藏的菜单

显示时的效果图:

隐藏时的效果图:


主要思想就是:利用flex的状态切换来控制,菜单的显示和隐藏

部分代码:

<s:states>
        <s:State name="show">
        </s:State>
        <s:State name="hide">
        </s:State>
    </s:states>

<s:Group width="100%">
                <s:BorderContainer width="100%" height.show="60" height.hide="0" includeInLayout.hide="false" backgroundColor="#ffffff">
                    <s:HGroup width.show="100%" height.show="60" width.hide="0" height.hide="0" verticalAlign="middle" horizontalAlign="center" gap="50">
                        <s:Button id="btn_phoneMeeting" label="电话会议" buttonMode="true" useHandCursor="true" />
                        <s:Button id="btn_boradMeeting" label="白板会议" buttonMode="true" useHandCursor="true" />
                        <s:Button id="btn_position" label="地图定位" buttonMode="true" useHandCursor="true" />
                        <s:Button id="btn_groupSendMsg" label="群发短信" buttonMode="true" useHandCursor="true"/>
                    </s:HGroup>
                </s:BorderContainer>
                <s:Image id="btnShowMune"
                         source.hide="{spanImg}"
                         source.show="{colImg}" horizontalCenter="0" height="10" width="100" buttonMode="true" useHandCursor="true"/>

</s:Group>


/**点击事件*/

private function colSpanClickHandler(event:MouseEvent):void{
            
            if(view.currentState=="show"){
                view.currentState="hide";
            }else{
                view.currentState="show";
            }
   }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值