1 Reply Latest reply on Feb 3, 2011 10:20 AM by kevinklin

    can't see ScrollBars

    Maximist

      Hallo. I need a little help. I have this mxml code:

       

      <s:BorderContainer width="776" height="538" y="32" left="2" depth="-1" backgroundColor="#333333" borderColor="#CCCCCC" borderAlpha="0.5">

       

           <s:Scroller id="myScroller" width="100%" height="100%" skinClass="skins.myScroller_skin">

       

                <s:Group id="myGroup" left="3" top="3" bottom="3" right="3"/>

       

           </s:Scroller>

       

      </s:BorderContainer>

       

      Inside scroller Skin there are the 2 scrollBars:

       

          <s:VScrollBar id="verticalScrollBar" visible="false"/>

       

          <s:HScrollBar id="horizontalScrollBar" visible="false" skinClass="skins.myHorizontalScrollBar"/>

       

      This is the code of the myHorizontalScrollBar:

       

      <s:Button skinClass="skins.myTrack" x="9" y="13" id="track"/>

       

      <s:Button skinClass="skins.myRightButton" x="666" y="1" id="incrementButton"/>

       

      <s:Button skinClass="skins.myLeftButton" x="-1" y="1" id="decrementButton"/>

       

      <s:Button skinClass="skins.myThumb" x="13" y="0" id="thumb"/>

       

      This is myTrack:

       

      <s:states>

           <s:State name="up"/>

           <s:State name="over"/>

           <s:State name="down"/>

           <s:State name="disabled"/>

      </s:states>

       

      <s:Rect height="6" id="rect38" width="776" x="0" y="0">

           <s:fill>

                <s:SolidColor color="#A9B5D0"/>

           </s:fill>

      </s:Rect>

       

      This is myThumb:

       

      <s:states>

           <s:State name="up"/>

           <s:State name="over"/>

           <s:State name="down"/>

           <s:State name="disabled"/>

      </s:states>

       

       

      <s:Group id="group107" x="0" y="0">

       

           <s:Path data="M 28.108 1.463 L 26.646 0 L 25.183 1.463 L 0 1.463 L 0 9.463 L 52 9.463 L 52 1.463 L 28.108 1.463 Z" x="0.947" y="0.555">

          

                <s:fill>

                     <s:SolidColor color="#A9B5D0"/>

                </s:fill>

           </s:Path>

       

       

           <s:BitmapImage ai:embed="1" d:id="4" smooth="true" source="@Embed('skins/myThumb.png')" x="5" y="4"/>

       

       

      </s:Group>

       

       

      The myGroup width and height is changing dinamically as i draw many squares.. All this code gives no errors but i don't see any horizontal scrollbars even if my square width is greater than the borderContainer width and i don't see them .. So i need my scrollbars and with my code i don't see any scrollbars.. What i did wrong??..

       

      Thx for all and sry for english.

       

      Max

        • 1. Re: can't see ScrollBars
          kevinklin Adobe Employee

          Hi,

           

          I think the problem is that the Group is constrained to the size of the Scroller, so even if the Group grows in size, the constraints will force it to shrink back. The solution is to remove the constraints from "myGroup". Hope that helps. Let me know if you have further trouble.

           

          -Kevin