3 Replies Latest reply on Mar 11, 2010 2:51 AM by s.lanton



      Is there a way to set  clipAndEnableScrolling=true so that the content is clipped only in the horizontal not the vertical

        • 1. Re: clipAndEnableScrolling

          Not really sure what you mean, you could do this:


          <mx:Canvas verticalScrollPolicy="auto" horizontalScrollPolicy="off" >




          If your content is bigger than the canvas itself it should create a vertical scrollbar, and the horizontal scroll bar will not become visible and will clip your content to the right.

          • 2. Re: clipAndEnableScrolling
            Shongrunden Adobe Employee

            I'm not really sure what your use case is, but you can simulate something like this with two Groups, setting clipAndEnableScrolling to true on the outer Group with a larger height than the inner Group:


            <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                <!-- Notice that the Button (the large object) looks like it is horizontally
                     clipped at the width of its parent container (100px).  Vertically the 
                     Button does not appear to be clipped since it is showing more than
                     100 pixels high.
                <s:Group id="outerGroup" width="100" height="100%" clipAndEnableScrolling="true">
                    <s:Group id="innerGroup" width="100" height="100">
                        <s:Rect width="100%" height="100%">
                                <s:SolidColor color="red" />
                        <s:Button label="large object" width="200" height="200" />
            • 3. Re: clipAndEnableScrolling
              s.lanton Level 1

              Thanks that what I needed