4 Replies Latest reply on Sep 25, 2011 11:54 AM by roestigraben

    Scrollbar enabled yes/no

    roestigraben Level 1

      Hello,

       

      I have a webbased Flex application which is higher than than the screen allows without scrolling.

       

      Now, my bin-debug on the local machine shows me nicely the scroll bar (vertical) when I look at the application in a browser.

       

      But when I do a bin-release (production release) and load it onto my remote site, the scroll bar has gone

       

      How do I control the presence of a scrolle bar?

       

      Seems to be a basic question but I can't resolve it

       

      thanks

       

      Peter

        • 1. Re: Scrollbar enabled yes/no
          Michael J Roberts Level 2

          To have a scroll bar always show up, regardless of whether it's needed or not, you can set the container's "verticalScrollPolicy" attribute to "on" (default is "auto").  Here is an example of setting the Application to always show a vertical scroll bar.

           

          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"

                          layout="horizontal"

                          minWidth="955"

                          minHeight="600"

                          verticalScrollPolicy="on">

          </mx:Application>

           

          Hope this helps.

           

          ramblingdeveloper.com

          1 person found this helpful
          • 2. Re: Scrollbar enabled yes/no
            roestigraben Level 1

            Many thanks!

             

            Now, you show that this method is OK for mx:Applications

             

            It does not show up on my s:Application code hinting. Is this normal?

             

            BR

            Peter

            • 3. Re: Scrollbar enabled yes/no
              Michael J Roberts Level 2

              Scolling with Spark components is a bit different.  You need to define a Scroller around content that you want to scroll.  If you want to put a scroller around everything in your application the code would look like this:

               

              <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"

                                                 width="100%"

                                                 height="100%"

                                                 viewSourceURL="srcview/index.html">

                <s:Scroller height="100%" width="100%">

                      <s:Group>

                          <<<Your content/components here>>>

                     </s:Group>

                </s:Scroller>

              </s:Application>

               

              If you're scrollbar still doesn't show up you can put the verticalScrollPolicy="on" code in the Scroller tag.

               

              Hope this clears everything up for you.

               

              -Mike

              ramblingdeveloper.comhttp://

              • 4. Re: Scrollbar enabled yes/no
                roestigraben Level 1

                thanks a lot. This was quick!!!!