<?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: Disabling individual buttons on a Flex ButtonBar control</title>
	<atom:link href="http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/</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/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/comment-page-1/#comment-6909</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 02 Feb 2010 16:12:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/#comment-6909</guid>
		<description>@mindy,

The example is a bit out of date, but check out &lt;a href=&quot;http://blog.flexexamples.com/2009/08/01/disabling-specific-buttons-in-a-spark-buttonbar-control-in-flex-4/&quot; rel=&quot;nofollow&quot;&gt;&quot;Disabling specific buttons in a Spark ButtonBar control in Flex 4&quot;&lt;/a&gt;.

Peter</description>
		<content:encoded><![CDATA[<p>@mindy,</p>
<p>The example is a bit out of date, but check out <a href="http://blog.flexexamples.com/2009/08/01/disabling-specific-buttons-in-a-spark-buttonbar-control-in-flex-4/" rel="nofollow">&#8220;Disabling specific buttons in a Spark ButtonBar control in Flex 4&#8243;</a>.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mindy</title>
		<link>http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/comment-page-1/#comment-6908</link>
		<dc:creator>mindy</dc:creator>
		<pubDate>Tue, 02 Feb 2010 11:40:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/#comment-6908</guid>
		<description>how does this work for spark button bar control?</description>
		<content:encoded><![CDATA[<p>how does this work for spark button bar control?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/comment-page-1/#comment-5090</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 11 Aug 2009 13:53:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/#comment-5090</guid>
		<description>Oscar,

Using the Halo ButtonBar control or the new Spark ButtonBar control?

Peter</description>
		<content:encoded><![CDATA[<p>Oscar,</p>
<p>Using the Halo ButtonBar control or the new Spark ButtonBar control?</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oscar</title>
		<link>http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/comment-page-1/#comment-5087</link>
		<dc:creator>Oscar</dc:creator>
		<pubDate>Tue, 11 Aug 2009 07:46:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/#comment-5087</guid>
		<description>Hi Peter,

Is there a way to replace the button-component in the buttonbar with a new button-class (one that&#039;s created in catalyst)?</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>Is there a way to replace the button-component in the buttonbar with a new button-class (one that&#8217;s created in catalyst)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/comment-page-1/#comment-4311</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Wed, 24 Jun 2009 00:39:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/#comment-4311</guid>
		<description>Good friend you are right! It worked perfectly! Thank you very much</description>
		<content:encoded><![CDATA[<p>Good friend you are right! It worked perfectly! Thank you very much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/comment-page-1/#comment-4310</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 23 Jun 2009 23:10:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/#comment-4310</guid>
		<description>I haven&#039;t tested this, but maybe try:
&lt;pre class=&quot;code&quot;&gt;
Object(uic).text = &quot;&quot;;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t tested this, but maybe try:</p>
<pre class="code">
Object(uic).text = "";
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/comment-page-1/#comment-4313</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Tue, 23 Jun 2009 17:09:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/#comment-4313</guid>
		<description>One more question, if it were to leave the contents of the text fields blank when you click on the button would be like?</description>
		<content:encoded><![CDATA[<p>One more question, if it were to leave the contents of the text fields blank when you click on the button would be like?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/comment-page-1/#comment-4312</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Tue, 23 Jun 2009 16:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/#comment-4312</guid>
		<description>Friend, thank you, thank you even!</description>
		<content:encoded><![CDATA[<p>Friend, thank you, thank you even!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/comment-page-1/#comment-4314</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 23 Jun 2009 01:17:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/#comment-4314</guid>
		<description>Rodrigo,

How about something like the following (just add/remove whatever controls you want to enable/disable to the &lt;code&gt;switch&lt;/code&gt; statement):
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.core.UIComponent;
            import flash.utils.getQualifiedClassName;

            protected function btn_clickHandler(evt:MouseEvent):void {
                var uic:UIComponent;
                var idx:uint;
                var len:uint = cnvs.numChildren;
                for (idx=0; idx&lt;len; idx++) {
                    uic = cnvs.getChildAt(idx) as UIComponent;
                    switch (getQualifiedClassName(uic)) {
                        case &quot;mx.controls::Label&quot;:
                        case &quot;mx.controls::Text&quot;:
                        case &quot;mx.controls::TextArea&quot;:
                        case &quot;mx.controls::TextInput&quot;:
                            uic.enabled = !uic.enabled;
                            break;
                    }
                }
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:VBox id=&quot;cnvs&quot;&gt;
        &lt;mx:TextInput id=&quot;ti&quot; text=&quot;TextInput&quot; /&gt;
        &lt;mx:TextArea id=&quot;ta&quot; text=&quot;TextArea&quot; /&gt;
        &lt;mx:DateField id=&quot;df&quot; selectedDate=&quot;{new Date()}&quot; /&gt;
        &lt;mx:Label id=&quot;lbl&quot; text=&quot;Label&quot; /&gt;
        &lt;mx:Text id=&quot;txt&quot; text=&quot;Text&quot; /&gt;
        &lt;mx:ColorPicker id=&quot;cp&quot; /&gt;
    &lt;/mx:VBox&gt;
    &lt;mx:Button id=&quot;btn&quot; click=&quot;btn_clickHandler(event);&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>Rodrigo,</p>
<p>How about something like the following (just add/remove whatever controls you want to enable/disable to the <code>switch</code> statement):</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;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</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.core.UIComponent;</span>
<span style="color: #339933;">            import flash.utils.getQualifiedClassName;</span>
&nbsp;
<span style="color: #339933;">            protected function btn_clickHandler(evt:MouseEvent):void {</span>
<span style="color: #339933;">                var uic:UIComponent;</span>
<span style="color: #339933;">                var idx:uint;</span>
<span style="color: #339933;">                var len:uint = cnvs.numChildren;</span>
<span style="color: #339933;">                for (idx=0; idx&lt;len; idx++) {</span>
<span style="color: #339933;">                    uic = cnvs.getChildAt(idx) as UIComponent;</span>
<span style="color: #339933;">                    switch (getQualifiedClassName(uic)) {</span>
<span style="color: #339933;">                        case &quot;mx.controls::Label&quot;:</span>
<span style="color: #339933;">                        case &quot;mx.controls::Text&quot;:</span>
<span style="color: #339933;">                        case &quot;mx.controls::TextArea&quot;:</span>
<span style="color: #339933;">                        case &quot;mx.controls::TextInput&quot;:</span>
<span style="color: #339933;">                            uic.enabled = !uic.enabled;</span>
<span style="color: #339933;">                            break;</span>
<span style="color: #339933;">                    }</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:VBox</span> id=<span style="color: #ff0000;">&quot;cnvs&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;ti&quot;</span> text=<span style="color: #ff0000;">&quot;TextInput&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextArea</span> id=<span style="color: #ff0000;">&quot;ta&quot;</span> text=<span style="color: #ff0000;">&quot;TextArea&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DateField</span> id=<span style="color: #ff0000;">&quot;df&quot;</span> selectedDate=<span style="color: #ff0000;">&quot;{new Date()}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> id=<span style="color: #ff0000;">&quot;lbl&quot;</span> text=<span style="color: #ff0000;">&quot;Label&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Text</span> id=<span style="color: #ff0000;">&quot;txt&quot;</span> text=<span style="color: #ff0000;">&quot;Text&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ColorPicker</span> id=<span style="color: #ff0000;">&quot;cp&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:VBox</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Button</span> id=<span style="color: #ff0000;">&quot;btn&quot;</span> click=<span style="color: #ff0000;">&quot;btn_clickHandler(event);&quot;</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>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/comment-page-1/#comment-4315</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Mon, 22 Jun 2009 20:07:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/10/disabling-individual-buttons-on-a-flex-buttonbar-control/#comment-4315</guid>
		<description>Hello, the very good example! One question, I could disable all the fields of text that is inside a Canvas using getChildAt? Thanks for your help!</description>
		<content:encoded><![CDATA[<p>Hello, the very good example! One question, I could disable all the fields of text that is inside a Canvas using getChildAt? Thanks for your help!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

