Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


flex 4 textarea always show bottom

Posted on 2011-03-17
Medium Priority
Last Modified: 2012-05-11
IN Flex 4

I add and add texts,
I want to always show the last text
so the text box will need to be scrolled to the bottom.

Question by:yahoolane
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
LVL 29

Expert Comment

ID: 35162065
why you cannot try something like this

textArea.text =  label.text + NEXT_STR;
textArea.scrollPosition = textArea.maxScrollPosition;
LVL 29

Expert Comment

ID: 35162098
Enter text into TextField and press ENTER

private function onChange(event:Event):void{
      txtArea.text += txtInput.text + "\n";
      txtArea.verticalScrollPosition = txtArea.maxVerticalScrollPosition;
     txtInput.text = "";
      <mx:TextInput id="txtInput" enter="onChange(event)"/>
      <mx:TextArea id="txtArea"/>
LVL 29

Accepted Solution

dgofman earned 2000 total points
ID: 35162157
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.


Author Comment

ID: 35162258
No Joy

1119: Access of possibly undefined property maxScrollPosition through a reference with static type spark.components:TextArea

1119: Access of possibly undefined property scrollPosition through a reference with static type spark.components:TextArea.

Remember I am using Flex 4
LVL 29

Expert Comment

ID: 35162314
In this case you just need to use scrollToRange function

private function onChange(event:Event):void{
    txtArea.text += txtInput.text + "\n";
    txtInput.text = "";
      <s:TextInput id="txtInput" enter="onChange(event)"/>
      <s:TextArea id="txtArea" height="100"/>
LVL 29

Expert Comment

ID: 35173068
Hi yahoolane,
Please can you accept my answer.
I gave you two solutions for SDK 3 and 4.

Featured Post

Eye-catchers on the conference table

Challenge: The i-unit group was not satisfied with the audio quality during remote meetings. They were looking for a portable solution with excellent audio quality for use in their conference room but also at their client’s offices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

671 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question