<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flex Examples &#187; .errorTip</title>
	<atom:link href="http://blog.flexexamples.com/tag/errortip/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Dynamically styling error tips in Flex</title>
		<link>http://blog.flexexamples.com/2008/09/26/dynamically-styling-error-tips-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/09/26/dynamically-styling-error-tips-in-flex/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 06:34:15 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[getStyleDeclaration()]]></category>
		<category><![CDATA[StyleManager]]></category>
		<category><![CDATA[ToolTip]]></category>
		<category><![CDATA[.errorTip]]></category>
		<category><![CDATA[borderColor]]></category>
		<category><![CDATA[errorColor]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/26/dynamically-styling-error-tips-in-flex/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/">&#8220;Changing the background color of an error tip in Flex&#8221;</a>, we saw how you could change the background color of a Flex error tip by setting the borderColor style on the .errorTip CSS selector.</p> <p>The following example shows how you can style the Flex .errorTip style dynamically using ActionScript using [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/">&#8220;Changing the background color of an error tip in Flex&#8221;</a>, we saw how you could change the background color of a Flex error tip by setting the <code>borderColor</code> style on the <code>.errorTip</code> CSS selector.</p>
<p>The following example shows how you can style the Flex <code>.errorTip</code> style dynamically using ActionScript using the static <code>StyleManager.getStyleDeclaration()</code> and <code>setStyle()</code> methods.</p>
<p>Full code after the jump.</p>
<p><span id="more-809"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/errorTip_borderColor_test_2/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/09/26/dynamically-styling-error-tips-in-flex/ --&gt;
&lt;mx:Application name="errorTip_borderColor_test_2"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.FlexEvent;

            private function comboBox_valueCommit(evt:FlexEvent):void {
                if (comboBox.selectedIndex &gt; -1) {
                    var value:String = comboBox.selectedItem.data;
                    var cssObj:CSSStyleDeclaration;
                    cssObj = StyleManager.getStyleDeclaration(".errorTip");
                    cssObj.setStyle("borderColor", value);
                    textInput.setStyle("errorColor", value);
                    textInput.errorString = errStr;
                } else {
                    textInput.errorString = "";
                }
            }

            private function button_click(evt:MouseEvent):void {
                comboBox.selectedIndex = -1;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="Red"    data="red" /&gt;
        &lt;mx:Object label="Orange" data="haloOrange" /&gt;
        &lt;mx:Object label="Yellow" data="yellow" /&gt;
        &lt;mx:Object label="Green"  data="haloGreen" /&gt;
        &lt;mx:Object label="Blue"   data="haloBlue" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:String id="errStr"&gt;Oh noes, an errata!&lt;/mx:String&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="errorColor:"&gt;
                &lt;mx:ComboBox id="comboBox"
                        dataProvider="{arr}"
                        prompt="Please select a color:"
                        valueCommit="comboBox_valueCommit(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
        &lt;mx:Spacer width="100%" /&gt;
        &lt;mx:Button label="Deselect ComboBox"
                click="button_click(event);" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TextInput id="textInput" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/errorTip_borderColor_test_2/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/errorTip_borderColor_test_2/bin/main.html" width="100%" height="150"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Dynamically styling error tips in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/09/26/dynamically-styling-error-tips-in-flex/',contentID: 'post-809',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: '.errorTip,borderColor,errorColor,getStyleDeclaration()',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/09/26/dynamically-styling-error-tips-in-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Changing the background color of an error tip in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comments</comments>
		<pubDate>Thu, 22 May 2008 19:27:07 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[ToolTip]]></category>
		<category><![CDATA[.errorTip]]></category>
		<category><![CDATA[borderColor]]></category>
		<category><![CDATA[errorColor]]></category>
		<category><![CDATA[errorString]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can change the background color of a Flex error tip by setting the borderColor style on the .errorTip CSS selector.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/errorTip_borderColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Style&#62; @font-face { src: local("Base 02"); fontFamily: Base02Embedded; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can change the background color of a Flex error tip by setting the <code>borderColor</code> style on the <code>.errorTip</code> CSS selector.</p>
<p>Full code after the jump.</p>
<p><span id="more-639"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/errorTip_borderColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        @font-face {
            src: local("Base 02");
            fontFamily: Base02Embedded;
        }

        .errorTip {
            borderColor: haloOrange;
            color: black;
            fontFamily: Base02Embedded;
            fontSize: 16;
            fontWeight: normal;
        }

        TextInput {
            errorColor: haloOrange;
        }
    &lt;/mx:Style&gt;

    &lt;mx:TextInput id="textInput"
            errorString="Hey, you missed a spot!" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/errorTip_borderColor_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/errorTip_borderColor_test/bin/main.html" width="100%" height="150"></iframe></p>
<p class="new">For an example of setting the <code>.errorTip</code> selector&#8217;s <code>borderColor</code> style dynamically using ActionScript, see <a href="http://blog.flexexamples.com/2008/09/26/dynamically-styling-error-tips-in-flex/">&#8220;Dynamically styling error tips in Flex&#8221;</a>.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing the background color of an error tip in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/',contentID: 'post-639',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: '.errorTip,borderColor,errorColor,errorString',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Using embedded fonts with tool tips in Flex</title>
		<link>http://blog.flexexamples.com/2008/03/26/using-embedded-fonts-with-tool-tips-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/03/26/using-embedded-fonts-with-tool-tips-in-flex/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 04:33:46 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[ToolTip]]></category>
		<category><![CDATA[ToolTipEvent]]></category>
		<category><![CDATA[.errorTip]]></category>
		<category><![CDATA[errorString]]></category>
		<category><![CDATA[toolTipShown]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/26/using-embedded-fonts-with-tool-tips-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can use an embedded font with an error tool tip in Flex.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/errorTip_fontFamily_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/03/26/using-embedded-fonts-with-tool-tips-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white" creationComplete="init();"&#62; &#60;mx:Style&#62; @font-face { src: local("Comic Sans MS"); fontWeight: normal; fontFamily: ComicSansMSEmbedded; } .errorTip { borderStyle: [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can use an embedded font with an error tool tip in Flex.</p>
<p>Full code after the jump.</p>
<p><span id="more-547"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/errorTip_fontFamily_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/26/using-embedded-fonts-with-tool-tips-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        creationComplete="init();"&gt;

    &lt;mx:Style&gt;
        @font-face {
            src: local("Comic Sans MS");
            fontWeight: normal;
            fontFamily: ComicSansMSEmbedded;
        }

        .errorTip {
            borderStyle: "errorTipAbove";
            fontFamily: "ComicSansMSEmbedded";
            fontSize: 12;
            fontWeight: normal;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ToolTipEvent;
            import mx.controls.ToolTip;

            private function init():void {
                ToolTip.maxWidth = textInput.width;
            }

            private function textInput_toolTipShown(evt:ToolTipEvent):void {
                var tt:ToolTip = evt.toolTip as ToolTip;
                tt.x = textInput.x;
                tt.y = (textInput.y - tt.height);
                tt.rotation = 5;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:TextInput id="textInput" text="{new Date().toDateString()}"
            errorString="The quick brown fox jumped over the lazy dog"
            toolTipShown="textInput_toolTipShown(event);" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/errorTip_fontFamily_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/errorTip_fontFamily_test/bin/main.html" width="100%" height="200"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Using embedded fonts with tool tips in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/03/26/using-embedded-fonts-with-tool-tips-in-flex/',contentID: 'post-547',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: '.errorTip,errorString,toolTipShown',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/03/26/using-embedded-fonts-with-tool-tips-in-flex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Trimming strings using the Flex StringUtil class&#8217;s trim() method</title>
		<link>http://blog.flexexamples.com/2007/09/07/trimming-strings-using-the-flex-stringutil-classs-trim-method/</link>
		<comments>http://blog.flexexamples.com/2007/09/07/trimming-strings-using-the-flex-stringutil-classs-trim-method/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 07:22:58 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[EmailValidator]]></category>
		<category><![CDATA[StringUtil]]></category>
		<category><![CDATA[StringValidator]]></category>
		<category><![CDATA[Validator]]></category>
		<category><![CDATA[.errorTip]]></category>
		<category><![CDATA[trim()]]></category>
		<category><![CDATA[validateAll()]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/07/trimming-strings-using-the-flex-stringutil-classs-trim-method/</guid>
		<description><![CDATA[<p>The following example shows you how to use the StringUtil.trim() method in Flex to remove leading and trailing whitespace from form fields before validating user input. This allows you to make sure that user&#8217;s don&#8217;t try anything sneaky like enter spaces instead of characters to bypass any minimum length validation you may have in place [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows you how to use the <code>StringUtil.trim()</code> method in Flex to remove leading and trailing whitespace from form fields before validating user input. This allows you to make sure that user&#8217;s don&#8217;t try anything sneaky like enter spaces instead of characters to bypass any minimum length validation you may have in place when validating data.</p>
<p>Full code after the jump.</p>
<p><span id="more-159"></span></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2007/09/07/trimming-strings-using-the-flex-stringutil-classs-trim-method/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;StringUtil_trim_test&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        .errorTip {
            borderColor: haloBlue;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Style</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            import mx.controls.Alert;</span>
<span style="color: #339933;">            import mx.controls.TextInput;</span>
<span style="color: #339933;">            import mx.utils.StringUtil;</span>
<span style="color: #339933;">            import mx.validators.Validator;</span>
&nbsp;
<span style="color: #339933;">            private function trimStr(evt:FocusEvent):void {</span>
<span style="color: #339933;">                var ti:TextInput = TextInput(evt.currentTarget);</span>
<span style="color: #339933;">                ti.text = StringUtil.trim(ti.text);</span>
<span style="color: #339933;">            }</span>
&nbsp;
<span style="color: #339933;">            private function validateForm():void {</span>
<span style="color: #339933;">                var errors:Array = Validator.validateAll(validatorArray);</span>
<span style="color: #339933;">                if (errors.length) {</span>
<span style="color: #339933;">                    Alert.show(&quot;Form is somehow invalid.&quot;, &quot;INVALID&quot;);</span>
<span style="color: #339933;">                } else {</span>
<span style="color: #339933;">                    Alert.show(&quot;Form is valid.&quot;, &quot;VALID&quot;);</span>
<span style="color: #339933;">                }</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Array</span> id=<span style="color: #ff0000;">&quot;validatorArray&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:StringValidator</span> id=<span style="color: #ff0000;">&quot;firstNameValidator&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;{firstName}&quot;</span></span>
<span style="color: #000000;">                property=<span style="color: #ff0000;">&quot;text&quot;</span></span>
<span style="color: #000000;">                required=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:StringValidator</span> id=<span style="color: #ff0000;">&quot;lastNameValidator&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;{lastName}&quot;</span></span>
<span style="color: #000000;">                property=<span style="color: #ff0000;">&quot;text&quot;</span></span>
<span style="color: #000000;">                required=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:EmailValidator</span> id=<span style="color: #ff0000;">&quot;emailValidator&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;{email}&quot;</span></span>
<span style="color: #000000;">                property=<span style="color: #ff0000;">&quot;text&quot;</span></span>
<span style="color: #000000;">                required=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Array</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;First name:&quot;</span> required=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</span> id=<span style="color: #ff0000;">&quot;firstName&quot;</span> focusOut=<span style="color: #ff0000;">&quot;trimStr(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Last name:&quot;</span> required=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</span> id=<span style="color: #ff0000;">&quot;lastName&quot;</span> focusOut=<span style="color: #ff0000;">&quot;trimStr(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Email:&quot;</span> required=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</span> id=<span style="color: #ff0000;">&quot;email&quot;</span> focusOut=<span style="color: #ff0000;">&quot;trimStr(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Button</span> label=<span style="color: #ff0000;">&quot;Submit&quot;</span> click=<span style="color: #ff0000;">&quot;validateForm();&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/StringUtil_trim_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/StringUtil_trim_test/bin/main.html" width="100%" height="200"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Trimming strings using the Flex StringUtil class\&#039;s trim() method on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/09/07/trimming-strings-using-the-flex-stringutil-classs-trim-method/',contentID: 'post-159',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: '.errorTip,trim(),validateAll()',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/09/07/trimming-strings-using-the-flex-stringutil-classs-trim-method/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

