如何在flex移动视图中启用垂直滚动?

时间:2013-12-16 07:54:45

标签: flex flex-mobile

在运行时单击 Lire 按钮,然后从共享对象数据中填充其下的TextArea字段,显示变大:

enter image description here

这是代码:

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:s="library://ns.adobe.com/flex/spark" title=""
        creationComplete="creationCompleteHandler(event)" >
...
<s:VGroup width="100%" height="100%" paddingTop="5" verticalAlign="middle" horizontalAlign="center">
            <s:TextInput id="chp1" width="50%"/>
            <s:TextInput id="chp2" width="50%"/>
            <s:Button label="Enregistrer" click="enregistrer(event)" />
            <s:Label/>
            <s:Button label="Lire" click="lire(event)" />
            <s:TextArea id="area"/>
            <s:Label/>
            <s:HGroup> 
                <s:Button label="Envoyer" click="send(event)" />
                <s:Button label="Retour" click="navigator.popView()" />
            </s:HGroup>
            <s:TextArea id="resultHTTP"/>
            <s:TextInput id="h_url" text="{url}" visible="false"/>
</s:VGroup>

如何启用垂直滚动然后查看底部的其他组件?

1 个答案:

答案 0 :(得分:2)

用卷轴包装你的VGroup。这样的事情:     's:Scroller width =“100%”height =“100%”     s:VGroup width =“100%”height =“100%”paddingTop =“5”verticalAlign =“middle”horizo​​ntalAlign =“center”'