3 Replies Latest reply on Jun 19, 2009 6:56 AM by CoreyRLucier

    HorizontalScrollPolicy Gone?

    flairjax Level 1

      Since HorizontalScrollPolicy is gone from <s:Application> how do we prevent the main stage from getting scrollbars?

        • 1. Re: HorizontalScrollPolicy Gone?
          GordonSmith Level 4

          You should never see any. Spark components and applications don't support scrollbars by default. If you want them, you have to use a Scroller or a component that already has a Scroller in its skin.

           

          Gordon Smith

          Adobe Flex SDK Team

          • 2. Re: HorizontalScrollPolicy Gone?
            flairjax Level 1

            Ok, can someone tell me what the issue then?  With this (Flare is Flare datavisualization library with a huge graph 10,000 pixels wide):

            <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/halo"
                creationComplete="created();"
                initialize="init();"
                xmlns:flex="flare.flex.*"
                xmlns:components="com.myapp.view.components.*"
                xmlns:callout="com.myapp.view.components.callout.*"
                xmlns:net="flash.net.*"
                applicationComplete="registerGlobalKeyHandler()"
                width="696" height="696"

                    >

            .........script stuff ......

            <mx:Canvas id="visHolder" width="696" height="696" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                    <components:FlareVisual id="vis" 
                    width="696" height="696"
                    horizontalScrollPolicy="off" verticalScrollPolicy="off"
                    backgroundColor="#ffffff"
                    scrollRect="{rec}"
                    cacheAsBitmap="true"
                    />
                </mx:Canvas>

            </s:Application>

             

             

            WIth the above when the internal children of components:FlareVisual expand really wide, the stage expands out of the view beyond 696 by 696.

             

            If I use clipAndEnableScrolling="true" it still happens. And now on the far right their is a white strip of nothing. Its like the stage ends?  This was all working in fine in the Alpha build of Gumbo.

            • 3. Re: HorizontalScrollPolicy Gone?
              CoreyRLucier Adobe Employee

              I don't have flare handy nor your specific dataset, but this simple test yeilds no scroll bars and everything is in order and clipped as it should be.  The canvas is much larger than the size of the SWF/App and the content of the canvas is much larger than the Canvas itself, as in your example.

               

              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/halo"
                  width="696" height="696"
              >
                  <mx:Canvas id="visHolder" width="1000" height="1000" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                      <mx:Box width="2000" height="2000" backgroundColor="#00FF00"/>
                  </mx:Canvas>

               

              </s:Application>