将滚动条放在边框容器周围

时间:2011-07-25 18:04:00

标签: flex scroll containers flex4.5

我有一个包含其他组件的边框容器组件。问题是当边框组件内的其他组件被调用时,会扩散出边界。有谁知道如何在边框周围添加滚动条,以便itz组件在其中?

<s:BorderContainer id="varGroup" includeIn="initial">
    <s:Form width="151" height="154">
        <s:layout>
            <s:FormLayout gap="0" />
        </s:layout>
        <s:FormItem width="137" label="Name:" height="25">
            <s:TextInput id="TnameTI" width="99"/>
        </s:FormItem>
        <s:FormItem width="137" label="condition:" height="25">
            <s:TextInput id="TcondTI" width="99"/>
        </s:FormItem>
    </s:Form>
    <components:NewModel x="0" y="61"/>
</s:BorderContainer>

2 个答案:

答案 0 :(得分:5)

<s:BorderContainer id="varGroup" includeIn="initial">
<s:Scroller left="0" right="0" top="0" bottom="0">
<s:Group left="0" right="0" top="0" bottom="0">
    <s:Form width="151" height="154">
        <s:layout>
            <s:FormLayout gap="0" />
        </s:layout>
        <s:FormItem width="137" label="Name:" height="25">
            <s:TextInput id="TnameTI" width="99"/>
        </s:FormItem>
        <s:FormItem width="137" label="condition:" height="25">
            <s:TextInput id="TcondTI" width="99"/>
        </s:FormItem>
    </s:Form>
    <components:NewModel x="0" y="61"/>
</s:Group>
</s:Scroller>
</s:BorderContainer>

答案 1 :(得分:4)

你需要在s:Scroller

中使用s:Group

这应该这样做:

<s:BorderContainer id="varGroup" includeIn="initial">
    <s:Scroller left="0" right="0" top="0" bottom="0">
        <s:Group width="100%" height="100%">
            <!-- your stuff goes here -->
        </s:Group>
    </s:Scroller>
</s:BorderContainer>