I have the following spark Scroller
<s:VGroup width="100%" height="100%开发者_StackOverflow" gap="0">
<s:Scroller width="100%" height="100%">
<s:DataGroup width="100%" height="100%" itemRenderer="components.grid.GridItemRenderer">
<s:layout>
<s:VerticalLayout gap="0" />
</s:layout>
</s:DataGroup>
</s:Scroller>
</s:VGroup>
which is set to 100% width. The DataGroup is also set to 100% width. What I want to achieve is for the scroller's vertical scrollbar to OVERLAP the DataGrid. In other words I want the DataGroup to maintain the width of the outer VGroup even when the vertical scrollbar is displayed. I don't need the vertical scrollbar to move my content to the left, i want it to be displayed in top of that. Anybody has any idea?
Hope to have made myself clear enough, thanks to everyone!
Well, after much struggling I ended up changing my mxml markup so I could achieve what I was looking for. Instead of trying to overlap the scroller's scrollbar over the scroller's content, I droped the scroller completely and wraped my content within a group. Added a s:VScrollBar with a viewport pointing to the forementioned group and positioned this scrollbar over the group's content.
Does setting Scroller.measuredSizeIncludesScrollBars to true achieve what you are looking for?
精彩评论