Flex 4-TitleWindow上的垂直布局问题 [英] Flex 4 - Vertical layout problem on TitleWindow

查看:112
本文介绍了Flex 4-TitleWindow上的垂直布局问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这肯定是一个简单的问题,但我无法解决.我有一个可调整大小的标题窗口.在内部,我只希望VGroup保留表单的内容,而HGroup在底部具有一些按钮.非常标准的东西.

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> 

水平调整大小效果很好.但是,我希望它具有以下行为:当垂直调整TitleWindow的大小时,按钮相对于TitleWindow停留在相同的位置,并且内容VGroup垂直调整的大小.但是我不知道将VGroup的高度设置为什么?

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?

理想情况下是这样的:

height="{this.parent.height - buttonGroup.height - top*

或类似的东西....

推荐答案

您还可以尝试以下技巧:

You can also try the following trick:

<s:VGroup id="layoutContainer" width="100%" height="100%">

    <s:SkinnableContainer id="content" height="100%">
        ....content here....
    </s:SkinnableContainer>

    <!-- Buttons -->
    <s:HGroup id="buttonGroup"> 
        ... buttons here...
    </s:HGroup>
</s:VGroup>

目的是使内容容器在VGroup中占据尽可能大的垂直空间.

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!

这篇关于Flex 4-TitleWindow上的垂直布局问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆