4 Replies Latest reply on Aug 30, 2011 9:17 AM by PPetre

    TextArea Scrollbar problem

    PPetre

      I am starting to elarn flex and as a learning project I decided to make a simple RSS reader for one of my websites. I plan to release it as an Android app. The thing is I found a small problem with a textArea that has HTML text inside it. The text get's trimmed to the lenght that fits inside the text area. On the emulator, pressing the up/down arrow keys will make the textarea to render corectly just like it should...but on my tablet, there isn't a keyboard and even if it was it would not be OK to make this. Here is part of my code:

       

      protected function newstext_showHandler(event:FlexEvent):void

      {

           // TODO Auto-generated method stub

           var title:String = String(data[0]);

           var content:String = String(data[1]);

           this.title = title;

           StyleableTextField(newstext.textDisplay).htmlText = content;

      }

       

      data is an array passed from a previous screen. data[1] contains the HTML code.

       

      The TextArea is added with these properties:

      <s:TextArea id="newstext" x="0" y="0" width="100%" height="100%" editable="false" enabled="true" selectable="false" addedToStage="newstext_addedToStageHandler(event)" verticalScrollPolicy="on"/>

       

      I also attached two images to show what I mean. In the first pic even if I try to scroll down no text is displayed. In the seccond, right after I press the up/down arrow keys a new line appears rendered and if I scroll down the entire article is shown.

      http://imageshack.us/photo/my-images/195/beforearrowpressed.jpg/

      http://imageshack.us/photo/my-images/849/afterarrowpressed.jpg/

       

      If anyone has a fix for this please let me know.