<?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: Setting the selected index on the Spark ButtonBar control in Flex 4</title>
	<atom:link href="http://blog.flexexamples.com/2009/02/21/setting-the-selected-index-on-the-fxbuttonbar-control-in-flex-gumbo/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2009/02/21/setting-the-selected-index-on-the-fxbuttonbar-control-in-flex-gumbo/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Mon, 13 Feb 2012 01:38:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/02/21/setting-the-selected-index-on-the-fxbuttonbar-control-in-flex-gumbo/comment-page-1/#comment-6875</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Fri, 29 Jan 2010 20:39:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/21/setting-the-selected-index-on-the-fxbuttonbar-control-in-flex-gumbo/#comment-6875</guid>
		<description>If you wanted to do something similar in Flex 3.x, you&#039;d need to use the MX ToggleButtonBar instead of a ButtonBar, as seen in the following example:

&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application name=&quot;ToggleButtonBar_selectedIndex_test&quot;
        xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&gt;
    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:Form&gt;
            &lt;mx:FormItem label=&quot;selectedIndex:&quot;
                         direction=&quot;horizontal&quot;&gt;
                &lt;mx:HSlider id=&quot;slider&quot;
                           minimum=&quot;-1&quot;
                           maximum=&quot;5&quot;
                           snapInterval=&quot;1&quot;
                           tickInterval=&quot;1&quot;
                           liveDragging=&quot;true&quot;/&gt;
                &lt;mx:Label text=&quot;{tBtnBar.selectedIndex}&quot; /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;
  
    &lt;mx:ToggleButtonBar id=&quot;tBtnBar&quot;
                 selectedIndex=&quot;{slider.value}&quot;
                 horizontalCenter=&quot;0&quot; verticalCenter=&quot;0&quot;&gt;
        &lt;mx:dataProvider&gt;
            &lt;mx:ArrayCollection source=&quot;[One,Two,Three,Four,Five,Six]&quot; /&gt;
        &lt;/mx:dataProvider&gt;
    &lt;/mx:ToggleButtonBar&gt;
    
&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>If you wanted to do something similar in Flex 3.x, you&#8217;d need to use the MX ToggleButtonBar instead of a ButtonBar, as seen in the following example:</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> name=<span style="color: #ff0000;">&quot;ToggleButtonBar_selectedIndex_test&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ApplicationControlBar</span> dock=<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: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;selectedIndex:&quot;</span></span>
<span style="color: #000000;">                         direction=<span style="color: #ff0000;">&quot;horizontal&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HSlider</span> id=<span style="color: #ff0000;">&quot;slider&quot;</span></span>
<span style="color: #000000;">                           minimum=<span style="color: #ff0000;">&quot;-1&quot;</span></span>
<span style="color: #000000;">                           maximum=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #000000;">                           snapInterval=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #000000;">                           tickInterval=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #000000;">                           liveDragging=<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:Label</span> text=<span style="color: #ff0000;">&quot;{tBtnBar.selectedIndex}&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>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ApplicationControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ToggleButtonBar</span> id=<span style="color: #ff0000;">&quot;tBtnBar&quot;</span></span>
<span style="color: #000000;">                 selectedIndex=<span style="color: #ff0000;">&quot;{slider.value}&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;mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ArrayCollection</span> source=<span style="color: #ff0000;">&quot;[One,Two,Three,Four,Five,Six]&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ToggleButtonBar</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: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/02/21/setting-the-selected-index-on-the-fxbuttonbar-control-in-flex-gumbo/comment-page-1/#comment-6874</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Fri, 29 Jan 2010 20:34:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/21/setting-the-selected-index-on-the-fxbuttonbar-control-in-flex-gumbo/#comment-6874</guid>
		<description>@Zanpher,

This is a Flex 4 example, it will not run in Flex 3.x.</description>
		<content:encoded><![CDATA[<p>@Zanpher,</p>
<p>This is a Flex 4 example, it will not run in Flex 3.x.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zanpher</title>
		<link>http://blog.flexexamples.com/2009/02/21/setting-the-selected-index-on-the-fxbuttonbar-control-in-flex-gumbo/comment-page-1/#comment-6873</link>
		<dc:creator>Zanpher</dc:creator>
		<pubDate>Fri, 29 Jan 2010 19:28:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/21/setting-the-selected-index-on-the-fxbuttonbar-control-in-flex-gumbo/#comment-6873</guid>
		<description>Exactly. Using selectedIndex is broken in flex 3.3, this example does not function.</description>
		<content:encoded><![CDATA[<p>Exactly. Using selectedIndex is broken in flex 3.3, this example does not function.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

