当父级没有固定高度时,clipAndEnableScrolling?
我在使用 ClipAndEnableScrolling 时遇到一些问题,当父级具有固定高度时,它对于 VGroup 工作正常,但如果父级没有固定高度,则它不起作用并且内容会溢出。例如:
<s:TitleWindow width="500" height="500">
<s:VGroup width="100%">
<s:Group width="100%">
<!-- The content in here changes height based on the state, I won't complicate this example with the details -->
</s:Group>
<s:Group width="100%" clipAndEnableScrolling="true">
<s:Scroller height="100%" width="100%">
<s:DataGroup dataProvider="{someData}" width="100%">
<s:layout>
<s:VerticalLayout gap="1"/>
</s:layout>
</s:DataGroup>
</s:Scroller>
</s:Group>
</s:VGroup>
</s:TitleWindow>
这是一个人为的例子,但重点是我不提前知道第一组的高度,所以无法设置第二组的高度,而且现实中的组件要复杂得多上面的例子是这样的,所以我不想进行任何类型的体操来计算第二组以上所有物体的高度。
谁能告诉我如何在第二组上获得滚动条?
干杯,
克里斯
I am having some problems with clipAndEnableScrolling, it works fine for VGroup when the parent has fixed height, but if the parent doesn't have a fixed height then it doesn't work and the content spills over. e.g:
<s:TitleWindow width="500" height="500">
<s:VGroup width="100%">
<s:Group width="100%">
<!-- The content in here changes height based on the state, I won't complicate this example with the details -->
</s:Group>
<s:Group width="100%" clipAndEnableScrolling="true">
<s:Scroller height="100%" width="100%">
<s:DataGroup dataProvider="{someData}" width="100%">
<s:layout>
<s:VerticalLayout gap="1"/>
</s:layout>
</s:DataGroup>
</s:Scroller>
</s:Group>
</s:VGroup>
</s:TitleWindow>
This is a contrived example, but the point is that I don't know the hight of the first group ahead of time so can't set the height of the second group, also the component in reality is quite a lot more complex that the contrived example above so I don't want to have to perform any kind of gymnastics to calculate the heights of everything above the second Group.
Can anyone tell me how to get a scrollbar on the second group?
Cheers,
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可以尝试将所有组的高度设置为 100%,就像这样
Can you try setting height to 100% upon all the groups, something like this
将您的组放入滚动条中。
Put your group inside the scroller.