4 Replies Latest reply on Feb 29, 2012 2:05 AM by enricQ2

    Left Scrollbar ?

    enricQ2 Level 1

      Hi,

       

      I've looking for an easy way to move the scrollbar to the left.

      I've tried to override the function updateDisplayList for a custom list component,

      but it doesn't seem to work.

       

      It should be a simple customization, but I can not find the clue.

       

      Does anybody have a system to move it?

        • 1. Re: Left Scrollbar ?
          Jakub Wojciechowski Level 1

          I am using the same approach with overriding updateDisplayList and it works fine. You can check the code:

           

          protected override function updateDisplayList( unscaledWidth:Number, unscaledHeight:Number ):void{

              super.updateDisplayList( unscaledWidth, unscaledHeight );

              if( verticalScrollBar && verticalScrollBar.visible ){

                  verticalScrollBar.x = -verticalScrollBar.width;

              }

          }

           

          or mayby you are using spark list component ?

          • 2. Re: Left Scrollbar ?
            enricQ2 Level 1

            yes, at the moment I'm using only spark components, is this the problem I have then?

            • 3. Re: Left Scrollbar ?
              enricQ2 Level 1

              At the moment I'm trying to create a custom spark component extending skinnableContainer, with an VScrollBar.

               

              I suppose that will work.

               

              But it's very strange that there is not a easy solution for such a common problem in different languages.

              • 4. Re: Left Scrollbar ?
                enricQ2 Level 1

                I've found it really easy to do it with a custom component.

                 

                You create a component with the content and an VScrollBar, and the you should assign the viewport of the VscrollBar to the content.

                I hope it will be useful for someone.

                 

                 

                <s:VScrollBar id="scrollBar" viewport="{contentGroup}"

                                                          visible="true" left="0" top="0" bottom="0">

                          </s:VScrollBar>

                 

                    <!--- @copy spark.components.SkinnableContainer#contentGroup -->

                    <s:Group id="contentGroup" left="25" right="0" top="0" height="200"

                                               clipAndEnableScrolling="true">

                        <s:layout>

                            <s:BasicLayout/>

                        </s:layout>

                    </s:Group>