Flex 4 - TitleWindow 上的垂直布局问题
这肯定是一个简单的问题,但我无法解决它。我有一个可调整大小的标题窗口。在里面我只想要一个 VGroup 来保存表单的内容,并让 HGroup 在底部有一些按钮。非常标准的东西。
<!-- Content -->
<s:VGroup id="content" height="340" width="100%">
...more stuff in here...
</s:VGroup>
<!-- Buttons -->
<s:HGroup id="buttonGroup" width="100%">
...buttons in here...
</s:HGroup>
水平调整大小效果很好。但是,我希望它的行为使得当 TitleWindow 垂直调整大小时,按钮相对于 TitleWindow 保持在同一位置,并且内容 VGroup 垂直调整大小。但我不知道VGroup的高度设置为多少?
理想情况下它会是这样的:
height="{this.parent.height - buttonGroup.height - top*
或者类似的东西......
This must be a simple problem, but I can't get my head around it. I have a resizable title window. Inside I just want a VGroup to hold the contents of the form and an HGroup to have a few buttons at the bottom. Very standard stuff.
<!-- Content -->
<s:VGroup id="content" height="340" width="100%">
...more stuff in here...
</s:VGroup>
<!-- Buttons -->
<s:HGroup id="buttonGroup" width="100%">
...buttons in here...
</s:HGroup>
Horizonal resizing works fine. However, I want it to behave such that when the TitleWindow is resized vertically that the buttons stay in the same place relative to the TitleWindow and the content VGroup is resized vertically. But I don't know what to set the height of the VGroup to?
Ideally it would be like this:
height="{this.parent.height - buttonGroup.height - top*
or something like that....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您还可以尝试以下技巧:
目的是使内容容器在 VGroup 内占据尽可能多的垂直空间。
让我知道这是否对你有用!
You can also try the following trick:
The intent is to make the content-container take as mush as possible vertical space within the VGroup.
Let me know if that worked for you!
使用约束属性。
您可以尝试 AS:
但最好将其放入组件的 MXML 定义中
如果您愿意,可以添加一些填充和边距
Use constraint properties.
You could try for AS:
But better put it to MXML definition of the components
Add some paddings and margins if you like