简体   繁体   中英

How to enable vertical scroll in a flex mobile View?

At runtime when I click the Lire button then the TextArea field under it is populated from a sharedobject data and the display becomes bigger :

在此输入图像描述

Here is code :

<?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>

How to enable vertical scroll then to view others components at the bottom ?

wrap your VGroup with a scroller. something like this: 's:Scroller width="100%" height="100%" s:VGroup width="100%" height="100%" paddingTop="5" verticalAlign="middle" horizontalAlign="center"'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM