Flex 3 - 调整大小效果“问题”?
我对 VBox 的调整大小事件和调整大小效果有一个小问题。
我有这样的东西:
<mx:VBox id="container"
backgroundColor="0xFFFFFF"
backgroundAlpha=".9"
paddingTop="15"
paddingLeft="15"
paddingBottom="15"
verticalGap="5"
width="210"
maxHeight="340"
resizeEffect="{resize}"
verticalScrollPolicy="off"
borderStyle="solid">
.
.
.
</mx:VBox>
<mx:Resize id="resize"/>
在 vbox 内,我有一些根据用户交互折叠/展开的项目。问题是,当用户展开某个项目时,vbox 会调整大小到其最大高度,然后缩小以适合实际高度。
有谁知道如何防止它调整到最大高度并缩小到实际高度?
感谢您提供的任何帮助=)
问候。 BS_C3
I'm having a little issue with the resize event and resize effect of a VBox.
I have something like this:
<mx:VBox id="container"
backgroundColor="0xFFFFFF"
backgroundAlpha=".9"
paddingTop="15"
paddingLeft="15"
paddingBottom="15"
verticalGap="5"
width="210"
maxHeight="340"
resizeEffect="{resize}"
verticalScrollPolicy="off"
borderStyle="solid">
.
.
.
</mx:VBox>
<mx:Resize id="resize"/>
Inside the vbox, I have some items that collapse/expand depending on the user interaction. The problem is that when the user expands an item, the vbox resizes to its maximum height and then shrinks to fit the actual height.
Does anyone know how prevent it from resizing to its maximum height and shrinking back to its actual height??
Thanks for any help you can provide =)
Regards.
BS_C3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从您的问题来看,设置 maxHeight 属性似乎有问题。也许尝试删除
maxHeight="340"
并替换为From you question, it seems to have a problem with the maxHeight property being set. Maybe try removing
maxHeight="340"
and replace with或者,将 VBox 放入另一个容器中。将 VBox 高度设置为 100%,并在外部容器上调整大小。我已经使用这种类型的布局解决了许多调整大小的问题。
Alternatively, place the VBox inside another container. Set the VBox height to 100%, and do the resizing on the outter container. Ive solved loads of resizing issues using this type of layout.
尝试设置回 NaN 让 Flex 弄清楚。
Try setting back to NaN to let Flex figure it out.