3 Replies Latest reply on Jun 27, 2011 8:46 AM by Energetic Pixels

    Scrollbar on left side of panel vice right side

    Energetic Pixels

      I have a thumbnail panel which has a scrollbar being rendered when panel is overflowing.  But it is rendering on the wrong side (left). What am I doing wrong?

      I did not see anywhere in the FB (4.5) help about scrollbar position.  Here is my code:

       

      <s:Panel id="thumbsPanel" left="10" top="78" width="100%" maxWidth="384" title="Thumbnails">
                <s:VGroup id="aa" width="374" height="100%">
                     <s:DataGroup id="mediaGroup" dataProvider="{tempData}"
                                     itemRendererFunction="rendererFunction" /> 
                </s:VGroup>
                <s:VScrollBar  viewport="{aa}" height="100%" hasFocusableChildren="true" />
           </s:Panel>
      

       

      I am a newbie at spark components and tryin to learn by leaps and bounds (the hard way -- while on development contract)

       

      Tony

        • 1. Re: Scrollbar on left side of panel vice right side
          Energetic Pixels Level 1

          Duh, just set the constraints.  It is Friday.  My brain is wiped.

          Tony

          • 2. Re: Scrollbar on left side of panel vice right side
            Shongrunden Adobe Employee

            Is there a reason you have an extra VGroup in that Panel? 

             

            In general its good to avoid unneccesarily nested Groups and also if you have the DataGroup as your viewport you can take advantage of virtual layout if you have many items in your dataProvider.

             

            <s:Panel id="thumbsPanel" left="10" top="78" width="100%" maxWidth="384" title="Thumbnails">

                <s:DataGroup id="mediaGroup" dataProvider="{tempData}" width="374" height="100%

                             itemRendererFunction="rendererFunction">

                    <s:layout>

                        <s:VerticalLayout useVirtualLayout="true" />

                    </s:layout>

                </s:DataGroup>

                <s:VScrollBar  viewport="{mediaGroup}" height="100%" hasFocusableChildren="true" />

            </s:Panel>

            • 3. Re: Scrollbar on left side of panel vice right side
              Energetic Pixels Level 1

              Shongruden,

               

                  Thank you for the insight.  No, I had a brain dump when I add the VGroup in that panel.  I had taken it out before I read your reply. Last Friday was one of those days that nothing was going right.  Thanks for the suggestion of using the Virtual Layout.  My current testing data set is really small right now (only 19 items in xml format).  But when I push this to production and tie it to mysql where the dataset could be 1,000 items, I will probably see the application benefit from its use.

               

               

              Tony