Flex 4.6 - Spark TextArea won't scroll programatically


i'm trying make spark textarea component automatically scroll down text added it.

 

when textarea first populated, vertical scrollbar @ bottom, , everything's cool. if append more text, outright refuses scroll, , after spending day fooling around it, jumps top.

 

i've tried doing following, according example found here: http://devgirl.org/2010/12/16/automatically-scroll-flex-mobile-textarea/

 

styleabletextfield(textarea1.textdisplay).htmltext += texthtml;

styleabletextfield(textarea1.textdisplay).scrollv++;

 

 

i've tried following 2 lines of code:

 

styleabletextfield(textarea1.textdisplay).verticalscrollposition = int.max_value - 1;

textarea1.scrolltorange(int.max_value, int.max_value);

 

nothing works! whenever textarea updated, scrolls top, or doesn't move @ all.

 

i had working on ios, on android, nothing happen. , now, in process of mucking around it, jumps top of textarea on both platforms. i'm .net guy, company developing mobile version of 1 of our products in flex, , i'm guy volunteered learn flex, seat of pants.

 

i've got covered, scrolling issue pain in rear. tried displaying html content in stagewebview, found out later after bit of googling can't programmatically change vertical scroll position of stagewebview.

 

the weird part is, of these properties (i.e. htmltext, scrollv, etc) returning null in debugger after i've set them, kind of confusing. if knows better way of displaying html/rich text in mobile environment (i.e. no tlf, believe it's called?), ears.

 

can please me out this? absolutely stumped.

 

by way, here's code textarea well:

 

<s:textarea id="textarea1" width="95%" height="75%" editable="false" fontsize="{fontsize}" verticalscrollpolicy="on" selectable="false"

                                         skinclass="spark.skins.mobile.textareaskin"

                                         />

use textarea.appendtext() method

will scroll down atuomatically



More discussions in Flex (Read Only)


adobe

Comments