组应垂直滚动,但宽度扩展至无限
我有一个组,我想为其启用水平滚动。垂直方向上,该组应尽可能宽 (100%)。
<s:Scroller left="0" right="0" top="0" bottom="0"
visible="{isVisible}"
horizontalScrollPolicy="off"
includeIn="stateA">
<comps:MyComp
horizontalScrollPosition="0" verticalScrollPosition="0"/>
</s:Scroller>
现在 MyComp 中还有另外两个组件,其宽度也为 100%。
现在,如果我启动应用程序,MyComp 组件的宽度约为 200 像素,并开始将其宽度扩展到无穷大。这就像一些过渡或动画,我不知道如何停止它。 设置诸如 maxWidth
之类的内容可以解决问题,但我不想设置显式值。
任何想法有什么问题吗?
I have a group for which I want to enable horizontal scrolling. Vertically the group should be as wide as possible (100%).
<s:Scroller left="0" right="0" top="0" bottom="0"
visible="{isVisible}"
horizontalScrollPolicy="off"
includeIn="stateA">
<comps:MyComp
horizontalScrollPosition="0" verticalScrollPosition="0"/>
</s:Scroller>
Now in MyComp are two other components having also a width of 100%.
Now if I start the application the MyComp-component is about 200px wide and starts to expand its width to infinity. This is like some transition or animation and I don't know how to stop it.
Setting something like maxWidth
would solve the issue, but I don't want to set explicit values.
Any ideas what's wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是,MyComp 组件(实际上是一个 Group)定义了 100% 的宽度。
删除该值后,一切都按预期工作。
problem was, that the MyComp component (which is actually a Group) got a width of 100% defined.
After removing this value, all works like expected.