2013-12-16 54 views
0

在运行时,当我点击里拉按钮,然后在它之下的TextArea字段是从一个共享对象的数据填充和显示变得更大:如何在Flex移动视图中启用垂直滚动?

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> 

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

回答

2

用卷轴包装您的VGroup。像这样: 's:Scroller width =“100%”height =“100%” s:VGroup width =“100%”height =“100%”paddingTop =“5”verticalAlign =“middle”horizo​​ntalAlign =“中心“'

+0

对不起格式 – kris

+0

您是否已将pageScrollingEnabled设置为true并且interactionMode触摸? – kris