<?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; errorString</title>
	<atom:link href="http://blog.flexexamples.com/tag/errorstring/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>Displaying the error indicator on a Spark FormItem container in Flex Hero</title>
		<link>http://blog.flexexamples.com/2010/08/30/displaying-the-error-indicator-on-a-spark-formitem-container-in-flex-hero/</link>
		<comments>http://blog.flexexamples.com/2010/08/30/displaying-the-error-indicator-on-a-spark-formitem-container-in-flex-hero/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 06:42:54 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Form (Spark)]]></category>
		<category><![CDATA[FormItem (Spark)]]></category>
		<category><![CDATA[Validator]]></category>
		<category><![CDATA[Validators]]></category>
		<category><![CDATA[errorString]]></category>
		<category><![CDATA[Hero]]></category>
		<category><![CDATA[validateAll()]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=3323</guid>
		<description><![CDATA[<p>The following example shows how you can display the error indicator on a Spark FormItem container in Flex Hero by setting the errorString property or using the Flex validators.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/08/30/displaying-the-error-indicator-on-a-spark-formitem-container-in-flex-hero/ --&#62; &#60;s:Application name=&#34;Spark_Form_Validator_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34;&#62; &#60;s:layout&#62; &#60;s:VerticalLayout horizontalAlign=&#34;center&#34; verticalAlign=&#34;middle&#34; /&#62; &#60;/s:layout&#62; &#160; &#60;fx:Script&#62; &#60;!&#91;CDATA&#91; import mx.validators.Validator; &#160; protected function [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can display the error indicator on a Spark FormItem container in Flex Hero by setting the <code>errorString</code> property or using the Flex validators.</p>
<p><span id="more-3323"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the beta Adobe Flex Hero SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex Hero SDK, see <a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+Hero">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+Hero</a>.</strong></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/2010/08/30/displaying-the-error-indicator-on-a-spark-formitem-container-in-flex-hero/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_Form_Validator_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VerticalLayout</span> horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">            import mx.validators.Validator;</span>
&nbsp;
<span style="color: #000000;">            protected function resetBtn_clickHandler<span style="color: #66cc66;">&#40;</span>evt:MouseEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                username.text = <span style="color: #ff0000;">&quot;&quot;</span>;</span>
<span style="color: #000000;">                password1.text = <span style="color: #ff0000;">&quot;&quot;</span>;</span>
<span style="color: #000000;">                password2.text = <span style="color: #ff0000;">&quot;&quot;</span>;</span>
<span style="color: #000000;">                username.errorString = <span style="color: #ff0000;">&quot;&quot;</span>;</span>
<span style="color: #000000;">                password1.errorString = <span style="color: #ff0000;">&quot;&quot;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            protected function submitBtn_clickHandler<span style="color: #66cc66;">&#40;</span>evt:MouseEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                Validator.validateAll<span style="color: #66cc66;">&#40;</span>valArr<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Array</span> id=<span style="color: #ff0000;">&quot;valArr&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:StringValidator</span> source=<span style="color: #ff0000;">&quot;{username}&quot;</span> property=<span style="color: #ff0000;">&quot;text&quot;</span> required=<span style="color: #ff0000;">&quot;true&quot;</span> minLength=<span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:StringValidator</span> source=<span style="color: #ff0000;">&quot;{password1}&quot;</span> property=<span style="color: #ff0000;">&quot;text&quot;</span> required=<span style="color: #ff0000;">&quot;true&quot;</span> minLength=<span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Array</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Form</span> id=<span style="color: #ff0000;">&quot;frm&quot;</span> defaultButton=<span style="color: #ff0000;">&quot;{submitBtn}&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;#EEEEEE&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:FormHeading</span> label=<span style="color: #ff0000;">&quot;Spark Form Heading&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;haloSilver&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:FormItem</span> sequenceLabel=<span style="color: #ff0000;">&quot;1.&quot;</span> label=<span style="color: #ff0000;">&quot;Username:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:helpContent</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;user@domain.com&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:helpContent</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:TextInput</span> id=<span style="color: #ff0000;">&quot;username&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:FormItem</span> sequenceLabel=<span style="color: #ff0000;">&quot;2.&quot;</span> label=<span style="color: #ff0000;">&quot;Password:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:helpContent</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;weak&quot;</span> color=<span style="color: #ff0000;">&quot;red&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:helpContent</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:TextInput</span> id=<span style="color: #ff0000;">&quot;password1&quot;</span> displayAsPassword=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:FormItem</span> sequenceLabel=<span style="color: #ff0000;">&quot;3.&quot;</span> label=<span style="color: #ff0000;">&quot;Confirm password:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:helpContent</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HGroup</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;One&quot;</span> color=<span style="color: #ff0000;">&quot;red&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Two&quot;</span> color=<span style="color: #ff0000;">&quot;blue&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:HGroup</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:helpContent</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:TextInput</span> id=<span style="color: #ff0000;">&quot;password2&quot;</span> displayAsPassword=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HorizontalLayout</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;resetBtn&quot;</span> label=<span style="color: #ff0000;">&quot;Reset&quot;</span> click=<span style="color: #ff0000;">&quot;resetBtn_clickHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;submitBtn&quot;</span> label=<span style="color: #ff0000;">&quot;Submit&quot;</span> click=<span style="color: #ff0000;">&quot;submitBtn_clickHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Form</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">This entry is based on a beta version of the Flex Hero SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Hero SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying the error indicator on a Spark FormItem container in Flex Hero on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/08/30/displaying-the-error-indicator-on-a-spark-formitem-container-in-flex-hero/',contentID: 'post-3323',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'errorString,Hero,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/2010/08/30/displaying-the-error-indicator-on-a-spark-formitem-container-in-flex-hero/feed/</wfw:commentRss>
		<slash:comments>0</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>Setting an error string on a CheckBox control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/21/setting-an-error-string-on-a-checkbox-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/21/setting-an-error-string-on-a-checkbox-control-in-flex/#comments</comments>
		<pubDate>Thu, 22 May 2008 06:17:02 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[CheckBox]]></category>
		<category><![CDATA[errorString]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/21/setting-an-error-string-on-a-checkbox-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set an error string on a Flex CheckBox control by setting the errorString property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/CheckBox_errorString_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/21/setting-an-error-string-on-a-checkbox-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ private function checkBox_change(evt:Event):void { if (checkBox.selected) { checkBox.errorString = ""; } [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set an error string on a Flex CheckBox control by setting the <code>errorString</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-638"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/CheckBox_errorString_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/21/setting-an-error-string-on-a-checkbox-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function checkBox_change(evt:Event):void {
                if (checkBox.selected) {
                    checkBox.errorString = "";
                } else {
                    checkBox.errorString = "You must click here to continue";
                }
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Panel width="100%" height="100%"&gt;
        &lt;mx:TextArea id="textArea"
                condenseWhite="true"
                editable="false"
                textAlign="justify"
                width="100%"
                height="100%"&gt;
            &lt;mx:htmlText&gt;
                &lt;![CDATA[
                    &lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque vitae massa. Curabitur sed dolor. Maecenas risus lacus, pretium eget, tempor vestibulum, mattis vitae, sem. Pellentesque ligula nisi, sagittis sit amet, tincidunt vitae, volutpat non, arcu. Mauris non arcu. In molestie nunc. Nam molestie dui lacinia massa commodo vehicula. Ut sed ante sit amet tellus aliquam rhoncus. Nunc orci urna, dictum eget, faucibus vitae, tempus vel, dui. Vestibulum quis arcu. Morbi felis justo, hendrerit quis, tempus ac, elementum sit amet, quam. Proin congue, leo eget aliquet rhoncus, tellus lectus varius ipsum, ac ultrices erat ligula non justo. Nunc porttitor diam vel dolor luctus semper. Ut non eros volutpat mi condimentum ornare. Praesent quis nunc et libero pulvinar pretium. Sed leo lorem, fringilla vel, sodales ac, suscipit ut, nunc. Vestibulum faucibus elit. Vivamus pharetra libero ut arcu. Curabitur sit amet tellus.&lt;/p&gt;
                    &lt;p&gt;Fusce sagittis. Suspendisse potenti. Aliquam velit sapien, porta at, cursus sed, pellentesque sit amet, libero. Duis aliquet purus eget mauris. Curabitur a ipsum. Nulla facilisi. Etiam porta, odio quis semper cursus, est ante volutpat massa, quis blandit orci dui ut nibh. Nulla sodales leo sit amet ligula. Suspendisse ultrices. Proin vitae felis.&lt;/p&gt;
                    &lt;p&gt;Maecenas pellentesque, ligula blandit venenatis semper, magna quam laoreet urna, ut iaculis urna urna eu tortor. In interdum, dolor ut lobortis congue, massa velit egestas lectus, sed commodo sapien risus et ante. Proin id erat ac nibh luctus aliquet. Vestibulum sagittis turpis non est. Suspendisse ipsum ligula, suscipit vel, feugiat eu, commodo non, risus. Integer suscipit sapien quis lectus. Aliquam dictum, magna quis pellentesque aliquet, felis pede porttitor quam, at luctus risus odio eu ante. Phasellus a purus. Ut id dui nec diam congue auctor. Nullam nec pede. Vivamus ullamcorper iaculis urna.&lt;/p&gt;
                    &lt;p&gt;Ut ultrices. Praesent convallis massa sit amet ipsum. Aenean varius posuere erat. Sed vulputate, purus eu consectetuer molestie, risus dui egestas augue, sed cursus sapien orci a turpis. Cras erat metus, ullamcorper quis, sollicitudin quis, suscipit vitae, ipsum. Suspendisse metus dolor, aliquet sit amet, vulputate sit amet, euismod ac, tortor. Nulla facilisi. Vestibulum ac sem at arcu blandit pretium. Sed faucibus, dolor sit amet viverra aliquet, mi arcu sollicitudin ante, at consequat risus mauris sit amet ante. Phasellus mi tellus, blandit ac, tempor a, pulvinar vel, ligula. Pellentesque molestie est sed nulla. Nam vel quam at magna pulvinar gravida. Curabitur sed neque eget enim tempor volutpat. Praesent varius. Nulla varius pulvinar nunc. Nulla interdum eros sed quam.&lt;/p&gt;
                    &lt;p&gt;Aliquam erat volutpat. Aliquam vestibulum. Mauris fringilla, enim vitae viverra aliquet, nunc purus pretium massa, congue viverra lectus lacus in est. Sed posuere augue a tellus. Ut nunc leo, luctus ut, consequat scelerisque, ornare eu, metus. Duis et purus. Nunc hendrerit nunc. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Integer vel neque. Proin mi. Aliquam sollicitudin, nulla et tincidunt luctus, orci magna eleifend velit, placerat tempor ipsum sem vitae tortor. Etiam ac urna placerat erat pulvinar venenatis. Phasellus convallis diam in metus. Donec dui risus, sollicitudin vel, pulvinar sit amet, luctus sed, massa. Quisque ultrices lacus vel eros.&lt;/p&gt;
                ]]&gt;
            &lt;/mx:htmlText&gt;
        &lt;/mx:TextArea&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:CheckBox id="checkBox"
                    label="I have read and agreed to your license"
                    errorString="You must click here to continue"
                    change="checkBox_change(event);"
                    width="100%" /&gt;
            &lt;mx:Button label="Next &gt;&gt;"
                    enabled="{checkBox.selected}" /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/CheckBox_errorString_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/CheckBox_errorString_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>For some similar examples, see <a href="http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/">&#8220;Checking to see if a Flex CheckBox is selected before allowing a user to press a Button&#8221;</a>.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting an error string on a CheckBox control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/21/setting-an-error-string-on-a-checkbox-control-in-flex/',contentID: 'post-638',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: '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/21/setting-an-error-string-on-a-checkbox-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Displaying an error tool tip for an Image control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/03/displaying-an-error-tool-tip-for-an-image-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/03/displaying-an-error-tool-tip-for-an-image-control-in-flex/#comments</comments>
		<pubDate>Sun, 04 May 2008 06:56:21 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Image]]></category>
		<category><![CDATA[errorString]]></category>
		<category><![CDATA[ioError]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/03/displaying-an-error-tool-tip-for-an-image-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can display an error string on the Flex Image control when an image is unable to be loaded.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Image_errorString_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/03/displaying-an-error-tool-tip-for-an-image-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Image id="img" source="http://www.helpexamples.com/flash/images/404.gif" width="160" height="120" ioError="img.errorString = event.text;" /&#62; &#60;/mx:Application&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can display an error string on the Flex Image control when an image is unable to be loaded.</p>
<p>Full code after the jump.</p>
<p><span id="more-619"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Image_errorString_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/03/displaying-an-error-tool-tip-for-an-image-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Image id="img"
            source="http://www.helpexamples.com/flash/images/404.gif"
            width="160"
            height="120"
            ioError="img.errorString = event.text;" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Image_errorString_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/Image_errorString_test/bin/main.html" width="100%" height="300"></iframe></p>
<p class="note">The error string only appears if you hover your mouse over the broken image skin.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying an error tool tip for an Image control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/03/displaying-an-error-tool-tip-for-an-image-control-in-flex/',contentID: 'post-619',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'errorString,ioError',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/03/displaying-an-error-tool-tip-for-an-image-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>3</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>Checking to see if a Flex CheckBox is selected before allowing a user to press a Button</title>
		<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/</link>
		<comments>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 03:12:55 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Button]]></category>
		<category><![CDATA[CheckBox]]></category>
		<category><![CDATA[errorString]]></category>
		<category><![CDATA[selected]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/</guid>
		<description><![CDATA[<p>The following example shows a few different ways of checking to see if the user selected a CheckBox control before allowing them to click a Button control. Got other tips? Leave them in the comments!</p> <p>Full code after the jump.</p> <p></p> <p>1. Check to see if the selected property of the CheckBox instance is true:</p> [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows a few different ways of checking to see if the user selected a CheckBox control before allowing them to click a Button control. Got other tips? Leave them in the comments!</p>
<p>Full code after the jump.</p>
<p><span id="more-174"></span></p>
<p>1. Check to see if the <code>selected</code> property of the CheckBox instance is <code>true</code>:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/CheckBox_Button_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.Alert;

            private function isChecked():void {
                if (!checkBox.selected) {
                    Alert.show("You must agree to the EULA before continuing.");
                } else {
                    Alert.show("Continuing...");
                }
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:CheckBox id="checkBox"
            label="I have read and agree with the EULA..." /&gt;

    &lt;mx:Button label="Continue"
            click="isChecked();" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/CheckBox_Button_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/CheckBox_Button_test/bin/main.html" width="100%" height="120"></iframe></p>
<p>2. Bind the Button control&#8217;s <code>enabled</code> property to the CheckBox control&#8217;s <code>selected</code> property:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/CheckBox_Button_test_2/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:CheckBox id="checkBox"
            label="I have read and agree with the EULA..." /&gt;

    &lt;mx:Button label="Continue"
            enabled="{checkBox.selected}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/CheckBox_Button_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/CheckBox_Button_test_2/bin/main.html" width="100%" height="120"></iframe></p>
<p>3. Set the Button control&#8217;s <code>errorString</code> property when the user rolls their mouse over the button. Add an <code>if</code> statement in the Button control&#8217;s <code>click</code> event handler that checks to see if the button&#8217;s error string is an empty string (or you could check if the check box is selected):</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/CheckBox_Button_test_3/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.Alert;

            private function button_rollOver(evt:MouseEvent):void {
                if (!checkBox.selected) {
                    button.errorString = "You must agree to the EULA before continuing.";
                }
            }

            private function button_rollOut(evt:MouseEvent):void {
                button.errorString = "";
            }

            private function button_click(evt:MouseEvent):void {
                if (button.errorString.length == 0) {
                    Alert.show("Continuing...");
                }
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:CheckBox id="checkBox"
            label="I have read and agree with the EULA..." /&gt;

    &lt;mx:Button id="button"
            label="Continue"
            rollOver="button_rollOver(event);"
            rollOut="button_rollOut(event);"
            click="button_click(event);" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/CheckBox_Button_test_3/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/CheckBox_Button_test_3/bin/main.html" width="100%" height="120"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Checking to see if a Flex CheckBox is selected before allowing a user to press a Button on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/',contentID: 'post-174',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'errorString,selected',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/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Customizing a Flex TextInput control&#8217;s error color</title>
		<link>http://blog.flexexamples.com/2007/09/01/customizing-a-flex-textinput-controls-error-color/</link>
		<comments>http://blog.flexexamples.com/2007/09/01/customizing-a-flex-textinput-controls-error-color/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 01:24:34 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TextInput]]></category>
		<category><![CDATA[errorColor]]></category>
		<category><![CDATA[errorString]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/01/customizing-a-flex-textinput-controls-error-color/</guid>
		<description><![CDATA[<p>The following example shows how you can customize a Flex TextInput control&#8217;s error color and error string using the errorColor style and errorString property.</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/09/01/customizing-a-flex-textinput-controls-error-color/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:ApplicationControlBar dock="true"&#62; &#60;mx:Label text="errorColor:" /&#62; &#60;mx:ColorPicker id="colorPicker" /&#62; &#60;/mx:ApplicationControlBar&#62; &#60;mx:Form&#62; &#60;mx:FormItem label="text:" required="true"&#62; &#60;mx:TextInput [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can customize a Flex TextInput control&#8217;s error color and error string using the <code>errorColor</code> style and <code>errorString</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-149"></span></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/09/01/customizing-a-flex-textinput-controls-error-color/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Label text="errorColor:" /&gt;
        &lt;mx:ColorPicker id="colorPicker" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="text:" required="true"&gt;
            &lt;mx:TextInput id="textInput"
                    errorColor="{colorPicker.selectedColor}"
                    errorString="Custom error color" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem&gt;
            &lt;mx:Button /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_errorColor_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/TextInput_errorColor_test/bin/main.html" width="100%" height="250"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Customizing a Flex TextInput control\&#039;s error color on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/09/01/customizing-a-flex-textinput-controls-error-color/',contentID: 'post-149',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: '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/2007/09/01/customizing-a-flex-textinput-controls-error-color/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

