<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Changing the background color of a disabled TextArea control in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/08/17/changing-the-background-color-of-a-disabled-textarea-control-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/08/17/changing-the-background-color-of-a-disabled-textarea-control-in-flex/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/08/17/changing-the-background-color-of-a-disabled-textarea-control-in-flex/comment-page-1/#comment-7745</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Wed, 19 May 2010 01:02:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/17/changing-the-background-color-of-a-disabled-textarea-control-in-flex/#comment-7745</guid>
		<description>Posted; &lt;a href=&quot;http://blog.flexexamples.com/2010/05/18/changing-the-background-color-of-a-disabled-spark-textarea-control-in-flex-4/&quot; rel=&quot;nofollow&quot;&gt;&quot;Changing the background color of a disabled Spark TextArea control in Flex 4&quot;&lt;/a&gt;.

Peter</description>
		<content:encoded><![CDATA[<p>Posted; <a href="http://blog.flexexamples.com/2010/05/18/changing-the-background-color-of-a-disabled-spark-textarea-control-in-flex-4/" rel="nofollow">&#8220;Changing the background color of a disabled Spark TextArea control in Flex 4&#8243;</a>.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/08/17/changing-the-background-color-of-a-disabled-textarea-control-in-flex/comment-page-1/#comment-7744</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Wed, 19 May 2010 00:40:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/17/changing-the-background-color-of-a-disabled-textarea-control-in-flex/#comment-7744</guid>
		<description>@Tam,

You can either create a custom skin and set the &lt;code&gt;contentBackgroundColor&lt;/code&gt; style in the &lt;code&gt;disabled&lt;/code&gt; state (although that probably isn&#039;t very reusable -- although you could extend the Spark TextArea class and add an additional &lt;code&gt;disabledContentBackgroundColor&lt;/code&gt; style and then create a custom skin which applies the custom style).

Or, if you want the easiest solution, I&#039;d probably just use some clever little Advanced CSS like the following which sets the &lt;code&gt;contentBackgroundColor&lt;/code&gt; style in the default and &lt;code&gt;disabled&lt;/code&gt; states:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot; 
               xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot; 
               xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;&gt;
    
    &lt;fx:Style&gt;
        @namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
        @namespace mx &quot;library://ns.adobe.com/flex/mx&quot;;
        
        s&#124;TextArea {
            contentBackgroundColor: haloGreen;
        }
        s&#124;TextArea:disabled {
            contentBackgroundColor: red;
        }
    &lt;/fx:Style&gt;
    
    &lt;s:Panel id=&quot;pnl&quot;
            title=&quot;Spark Panel title&quot;
            horizontalCenter=&quot;0&quot; verticalCenter=&quot;0&quot;&gt;
        &lt;s:controlBarContent&gt;
            &lt;s:CheckBox id=&quot;cb&quot;
                    label=&quot;enabled&quot;
                    selected=&quot;true&quot; /&gt;
        &lt;/s:controlBarContent&gt;
        &lt;s:TextArea id=&quot;txtArea&quot;
                text=&quot;The quick brown fox jumps over the lazy dog&quot;
                enabled=&quot;{cb.selected}&quot; /&gt;
    &lt;/s:Panel&gt;
    
&lt;/s:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@Tam,</p>
<p>You can either create a custom skin and set the <code>contentBackgroundColor</code> style in the <code>disabled</code> state (although that probably isn&#8217;t very reusable &#8212; although you could extend the Spark TextArea class and add an additional <code>disabledContentBackgroundColor</code> style and then create a custom skin which applies the custom style).</p>
<p>Or, if you want the easiest solution, I&#8217;d probably just use some clever little Advanced CSS like the following which sets the <code>contentBackgroundColor</code> style in the default and <code>disabled</code> states:</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: #7400FF;">&lt;s:Application</span> 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>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        @namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
        @namespace mx &quot;library://ns.adobe.com/flex/mx&quot;;
&nbsp;
        s|TextArea {
            contentBackgroundColor: haloGreen;
        }
        s|TextArea:disabled {
            contentBackgroundColor: red;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Panel</span> id=<span style="color: #ff0000;">&quot;pnl&quot;</span></span>
<span style="color: #000000;">            title=<span style="color: #ff0000;">&quot;Spark Panel title&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:CheckBox</span> id=<span style="color: #ff0000;">&quot;cb&quot;</span></span>
<span style="color: #000000;">                    label=<span style="color: #ff0000;">&quot;enabled&quot;</span></span>
<span style="color: #000000;">                    selected=<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:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:TextArea</span> id=<span style="color: #ff0000;">&quot;txtArea&quot;</span></span>
<span style="color: #000000;">                text=<span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog&quot;</span></span>
<span style="color: #000000;">                enabled=<span style="color: #ff0000;">&quot;{cb.selected}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Panel</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>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tam</title>
		<link>http://blog.flexexamples.com/2008/08/17/changing-the-background-color-of-a-disabled-textarea-control-in-flex/comment-page-1/#comment-7742</link>
		<dc:creator>Tam</dc:creator>
		<pubDate>Tue, 18 May 2010 23:39:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/17/changing-the-background-color-of-a-disabled-textarea-control-in-flex/#comment-7742</guid>
		<description>the new s:TextArea doesn&#039;t have backgroundDisabledColor what is the best way to achieve that with the new component?</description>
		<content:encoded><![CDATA[<p>the new s:TextArea doesn&#8217;t have backgroundDisabledColor what is the best way to achieve that with the new component?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

