加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex4中 超出父容器边界的子项隐藏

发布时间:2020-12-15 04:33:53 所属栏目:百科 来源:网络整理
导读:转:http://www.it165.net/design/html/201109/308.html 设置clipAndEnableScrolling = true ?xml version="1.0" encoding="utf-8"? s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="librar

转:http://www.it165.net/design/html/201109/308.html

设置clipAndEnableScrolling = true

<?xml version="1.0" encoding="utf-8"?>   
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"    
               xmlns:s="library://ns.adobe.com/flex/spark"    
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"  
               currentState="show">   
    <fx:Declarations>   
        <s:Sine id="sineEasing"  
                easeInFraction="0.3"/>   
        <s:Move id="hideMove" target="{targetBox}" xTo="{-200}" duration="1000" easer="{sineEasing}" effectEnd="{currentState = 'hide'}"/>   
        <s:Move id="showMove" xTo="0" duration="1000" target="{targetBox}" effectEnd="{currentState = 'show'}"/>   
           
    </fx:Declarations>   
    <s:states>   
        <s:State name="show"/>   
        <s:State name="hide"/>   
    </s:states>   
    <s:Panel title="Move Effect Example"    
             id="testPanel"  
             x="100"  
             width="75%" height="75%">   
        <s:layout>   
            <s:BasicLayout clipAndEnableScrolling="true"/>   
        </s:layout>   
            <s:VGroup id="targetBox" width="50%">   
                <s:HGroup>   
                    <s:Panel title="test move" width="200" height="200" id="testpanel">   
                        <s:TextArea text="clipContent值:True:当子项目的边界超出此容器时,不显示子项目在此容器中。Flase:当子项目的边界超出此容器时,显示子项目在此容器中。"/>   
                    </s:Panel>   
                    <s:Button height="200"    
                              width="40"  
                              click.show="{hideMove.play()}"  
                              click.hide="{showMove.play()}"/>      
                </s:HGroup>   
            </s:VGroup>   
    </s:Panel>   
</s:Application>  

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读