Home Tutorial Flex Flex4 Components TextArea in Flex4

 
 

Share on Google+Share on Google+
TextArea in Flex4
Posted on: May 11, 2010 at 12:00 AM
Advertisement
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

Advertisement

Related Tags for TextArea in Flex4:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: May 11, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com