<?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 a Button control&#8217;s icon when the button is disabled</title>
	<atom:link href="http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Thu, 18 Mar 2010 16:39:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Arnaud</title>
		<link>http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/comment-page-1/#comment-1775</link>
		<dc:creator>Arnaud</dc:creator>
		<pubDate>Thu, 04 Dec 2008 13:25:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/#comment-1775</guid>
		<description>Hello,

To supplement this solution, I provide alternative solutions:
You can apply a colormatrixfilter on the main icon when the button is disabled. The main advantage is that you don&#039;t need to embed another icon (only if you really require a different icon for disabled button) and the rendering is similar : everything is gray, the button, the label and the icon also.
Check this links :
http://afoucal.free.fr/index.php/2008/01/25/imagebutton-gray-disabled/
Or the following for a more customizable icon with other kind of filter:
http://afoucal.free.fr/index.php/2008/12/03/flex-enhancedbutton-free-the-icon/

Regards</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>To supplement this solution, I provide alternative solutions:<br />
You can apply a colormatrixfilter on the main icon when the button is disabled. The main advantage is that you don&#8217;t need to embed another icon (only if you really require a different icon for disabled button) and the rendering is similar : everything is gray, the button, the label and the icon also.<br />
Check this links :<br />
<a href="http://afoucal.free.fr/index.php/2008/01/25/imagebutton-gray-disabled/" rel="nofollow">http://afoucal.free.fr/index.php/2008/01/25/imagebutton-gray-disabled/</a><br />
Or the following for a more customizable icon with other kind of filter:<br />
<a href="http://afoucal.free.fr/index.php/2008/12/03/flex-enhancedbutton-free-the-icon/" rel="nofollow">http://afoucal.free.fr/index.php/2008/12/03/flex-enhancedbutton-free-the-icon/</a></p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/comment-page-1/#comment-1773</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Fri, 25 Apr 2008 15:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/#comment-1773</guid>
		<description>&lt;a href=&quot;http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/#comment-12285&quot; rel=&quot;nofollow&quot;&gt;Visi&lt;/a&gt;,

Does this work for you?
&lt;pre class=&quot;code&quot;&gt;
&lt;mx:Script&gt;
    &lt;![CDATA[
        private function hasData(btn:Button):Boolean {
            return (btn.data != null) &amp;&amp; String(btn.data).length &gt; 0;
        }
    ]]&gt;
&lt;/mx:Script&gt;

&lt;mx:Form&gt;
    &lt;mx:FormItem label=&quot;button 1 (default - null):&quot;&gt;
        &lt;mx:Button id=&quot;btn1&quot;
                label=&quot;Que?&quot;
                visible=&quot;{hasData(btn1)}&quot; /&gt;
    &lt;/mx:FormItem&gt;
    &lt;mx:FormItem label=&quot;button 2 (empty):&quot;&gt;
        &lt;mx:Button id=&quot;btn2&quot;
                data=&quot;&quot;
                label=&quot;Que?&quot;
                visible=&quot;{hasData(btn2)}&quot; /&gt;
    &lt;/mx:FormItem&gt;
    &lt;mx:FormItem label=&quot;button 3 (defined):&quot;&gt;
        &lt;mx:Button id=&quot;btn3&quot;
                data=&quot;value&quot;
                label=&quot;Que?&quot;
                visible=&quot;{hasData(btn3)}&quot; /&gt;
    &lt;/mx:FormItem&gt;
&lt;/mx:Form&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p><a href="http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/#comment-12285" rel="nofollow">Visi</a>,</p>
<p>Does this work for you?</p>
<pre class="code">
&lt;mx:Script&gt;
    &lt;![CDATA[
        private function hasData(btn:Button):Boolean {
            return (btn.data != null) &#038;&#038; String(btn.data).length &gt; 0;
        }
    ]]&gt;
&lt;/mx:Script&gt;

&lt;mx:Form&gt;
    &lt;mx:FormItem label="button 1 (default - null):"&gt;
        &lt;mx:Button id="btn1"
                label="Que?"
                visible="{hasData(btn1)}" /&gt;
    &lt;/mx:FormItem&gt;
    &lt;mx:FormItem label="button 2 (empty):"&gt;
        &lt;mx:Button id="btn2"
                data=""
                label="Que?"
                visible="{hasData(btn2)}" /&gt;
    &lt;/mx:FormItem&gt;
    &lt;mx:FormItem label="button 3 (defined):"&gt;
        &lt;mx:Button id="btn3"
                data="value"
                label="Que?"
                visible="{hasData(btn3)}" /&gt;
    &lt;/mx:FormItem&gt;
&lt;/mx:Form&gt;
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Visi</title>
		<link>http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/comment-page-1/#comment-1774</link>
		<dc:creator>Visi</dc:creator>
		<pubDate>Fri, 25 Apr 2008 12:37:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/#comment-1774</guid>
		<description>It is really a nice attempt to hide the text.
In addition to this I have a query .
I want to display a button only when data is present in the data field.
Button will not appear when there is no data in the data field.


Thanks in Advacnce for the help
Hope to hear soon

Visi</description>
		<content:encoded><![CDATA[<p>It is really a nice attempt to hide the text.<br />
In addition to this I have a query .<br />
I want to display a button only when data is present in the data field.<br />
Button will not appear when there is no data in the data field.</p>
<p>Thanks in Advacnce for the help<br />
Hope to hear soon</p>
<p>Visi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gregui Shigunov</title>
		<link>http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/comment-page-1/#comment-1772</link>
		<dc:creator>Gregui Shigunov</dc:creator>
		<pubDate>Thu, 13 Dec 2007 17:15:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/#comment-1772</guid>
		<description>Great Blog!
Congratulation!!!</description>
		<content:encoded><![CDATA[<p>Great Blog!<br />
Congratulation!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Beale</title>
		<link>http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/comment-page-1/#comment-1771</link>
		<dc:creator>David Beale</dc:creator>
		<pubDate>Sat, 03 Nov 2007 12:34:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/02/changing-a-button-controls-icon-when-the-button-is-disabled/#comment-1771</guid>
		<description>I posted about how to do this automatically here http://www.bealearts.co.uk/blog/2007/07/29/automatic-disabled-icon-with-flex-button-control/</description>
		<content:encoded><![CDATA[<p>I posted about how to do this automatically here <a href="http://www.bealearts.co.uk/blog/2007/07/29/automatic-disabled-icon-with-flex-button-control/" rel="nofollow">http://www.bealearts.co.uk/blog/2007/07/29/automatic-disabled-icon-with-flex-button-control/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
