Home Tutorial Flex Flex4 Components TextArea in Flex4

 
 

TextArea in Flex4
Posted on: May 11, 2010 at 12:00 AM
The TextArea control is a component of both the MX and Spark component sets and it is recommended to developers to use Spark Components while developing any program in Flex4.

TextArea Control in Flex4:

The TextArea control is a component of both the MX and Spark component sets and it is recommended to developers to use Spark Components while developing any program in Flex4. The characteristics of MX TextArea control is a multilinear, editable text field with a border. The scroll bars in MX TextArea is optional. It supports to HTML and rich text rendering capabilities of Flash Player and AIR. The MX TextArea control informs change and textInput events. It is primarily used to create a single-line, editable text field.
The tag of TextArea is <s:TextArea>.

Example:

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

xmlns:s="library://ns.adobe.com/flex/spark"

xmlns:mx="library://ns.adobe.com/flex/mx">

<fx:Script>

<![CDATA[

public function clr():void{

txtarea1.text="";

}

]]>

</fx:Script>

<s:Panel title="TextArea control Example" width="288" height="220" color="#990000">

<s:VGroup width="223" x="30" y="19">

<s:Label text="Write Discription:"/>

<s:TextArea id="txtarea1" width="222" height="100" color="Black" text="The TextArea control is a component of both the MX and Spark component sets and it is recommended to developers to use Spark Components while developing any program in Flex4.

The characteristics of MX TextArea control is a multilinear, editable text field with a border. The scroll bars in MX TextArea is optional. ">

</s:TextArea>

<s:Button id="btn2" label="Reset" click="clr()">

</s:Button>

</s:VGroup>

</s:Panel>

</s:Application>

Output:

Running Application:

To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.

Download this code

Related Tags for TextArea in Flex4:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.