Wrapping text based on Checkbox selection.
Example:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.ComboBox;
import mx.controls.Alert;
/*
* This fuction wrap or unwraps the text based on the check box selection.
*/
private function wrapText():void
{
taTextWrap.wordWrap=cbTextWrap.selected;
}
]]>
</mx:Script>
<mx:VBox id="vbMain" width="100%" height="100%">
<mx:CheckBox id="cbTextWrap" label="Wrap Text" change="wrapText()"/>
<mx:TextArea id="taTextWrap" width="400" height="300" wordWrap="false"/>
</mx:VBox>
</mx:Application>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.ComboBox;
import mx.controls.Alert;
/*
* This fuction wrap or unwraps the text based on the check box selection.
*/
private function wrapText():void
{
taTextWrap.wordWrap=cbTextWrap.selected;
}
]]>
</mx:Script>
<mx:VBox id="vbMain" width="100%" height="100%">
<mx:CheckBox id="cbTextWrap" label="Wrap Text" change="wrapText()"/>
<mx:TextArea id="taTextWrap" width="400" height="300" wordWrap="false"/>
</mx:VBox>
</mx:Application>