【问题标题】:putting a scroller around a border container在边框容器周围放置一个滚动条
【发布时间】:2011-07-25 18:03:59
【问题描述】:

我有一个包含其他组件的边框容器组件。问题是当边框内的其他组件被调用时,会散布到边框之外。有谁知道我如何在边框周围添加滚动条,以便 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>

【问题讨论】:

    标签: apache-flex scroll containers flex4.5


    【解决方案1】:
    <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>
    

    【讨论】:

    • 我确实试过了,得到了这个错误消息:'spark.core.IViewport'类型的默认属性'viewport'的多个初始值设定项
    • 好的,我已经编辑了我的帖子,错误消息中描述了非常明显的修复:)
    • 我会把它交给康斯坦丁,因为他开始了这一切,但感谢@Chris。你也做得很好
    • @henry 没问题 :) 我们在这里互相帮助 ;)
    【解决方案2】:

    您需要在 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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-24
      • 2013-05-31
      • 2013-02-04
      • 1970-01-01
      相关资源
      最近更新 更多