Custom Widget - Disappearing Scrollbar Issue

1948
3
07-17-2011 11:53 PM
HaydnDyer
New Contributor II
Hi All,

I am currently creating some custom widgets using the latest flex viewer (2.3.1) and am having some issues with disappearing scroll bars. 

I have created a couple of custom widgets that display lists of records.  Within these widgets I am using the scroller element along with an item renderer to list a set of results\records.   My issue is that the vertical scroll bar on the scroller element is not always displayed\showing i.e. sometimes it is displayed and sometimes it is not (this seems to occur randomly for no reason in particular).   This is obviously an issue when the amount of records do not fit within the widget.

- I have tried using fixed height and width for the scroller and all parent elements as well as turning the scrollbar policy to be always on
- If the widget is resized when the scrollbar is not showing the scrollbar will re-appear at some sizes but the size at which this occurs is not always the same
- It does not appear to be an issue with the length of the text within the records.  (The same set of records may or may not show the scrollbars)

Here is a snippet of the code:

                  <s:VGroup width="100%" height="100%" horizontalAlign="right" >         
                        <s:Scroller id="groupScroller"  width="100%" height="100%" visible="true" verticalScrollPolicy="on">      
                              <Prox:NearbyResultDataGroup id="nearbyResultsGroup"
                                                                        dataProvider="{nearbyResultAC}"
                                                                        queryResultClick="clickNearbyGroup(event)">
                                    <Prox:layout>
                                          <s:VerticalLayout gap="2"
                                                                    horizontalAlign="justify"
                                                                    useVirtualLayout="true"
                                                                    paddingRight="5"
                                                                    paddingTop="3" />
                                    </Prox:layout>
                              </Prox:NearbyResultDataGroup>
                        </s:Scroller>
                   </s:VGroup>

Please see attachments for screen shots.

Thanks,

Haydn
0 Kudos
3 Replies
by Anonymous User
Not applicable
Original User: danj

I also have a post for this issue.
http://forums.arcgis.com/threads/34366-Disappearing-scroll-bars

-Dan
0 Kudos
HaydnDyer
New Contributor II
Thanks for the reply Dan,

You mentioned in your post that the removeAllElements() function was causing you the issue.  Im actually not using it at all - I use an ArrayCollection as the data source for the Data group and just reinitialise it when i want to clear the items displayed within the scroller. However, i do show and hide the parent VGroup of the scroller so that i can show other elements within the widget and think this may have something to do with the issue.

Haydn
0 Kudos
HaydnDyer
New Contributor II
This issue was resolved by setting the height of the datagroup within the scroller element to 100%.

Haydn
0 Kudos