tags:

views:

16

answers:

1

I am having a little difficulty properly sizing a Scroller component in Adobe Flex/Flash 4.
As soon as I add an element to the 'widgetsGroup' VGroup, the scroller's height property resizes to match that of its parent border container, even though the content height of the vGroup may be significantly less than this value. This is a problem because the scroller then 'covers' other elements in the border container.

I guess what I am looking for is the scroller height to match the widgetGroup content height until this height exceeds the bordercontainer height, at which point the scroll bar would become visible.

Any suggestions

<s:BorderContainer>
     <s:Scroller id="widgetScroller" right="10" bottom="30" top="10" >
          <s:VGroup id="widgetsGroup" horizontalAlign="right" />
     </s:Scroller>
</s:BorderContainer>
A: 
<s:Scroller id="widgetScroller" right="10" bottom="30" top="10"  width="widgetsGroup.contentWidth" height="widgetsGroup.contentHeight" >
  <s:VGroup id="widgetsGroup" horizontalAlign="right" clipAndEnableScrolling="true" />
</s:Scroller>
Eugene
Thanks for the suggestion, but this doesn't do the trick. When a UIComponent is added to the widgetsGroup it never even becomes visible.
hm...try to intila set scroller sizes to some const, and add eventListener of creatingComplete of widgetGroup and write there a binding as shown in my answer.So this trick will able you to do post dynamic sizing.
Eugene