<?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 of a Flex LinkBar control</title>
	<atom:link href="http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 14:19:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: HQ</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/comment-page-1/#comment-9597</link>
		<dc:creator>HQ</dc:creator>
		<pubDate>Thu, 15 Sep 2011 09:10:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-9597</guid>
		<description>Thank you very much, it work for me.</description>
		<content:encoded><![CDATA[<p>Thank you very much, it work for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HQ</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/comment-page-1/#comment-9596</link>
		<dc:creator>HQ</dc:creator>
		<pubDate>Thu, 15 Sep 2011 09:02:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-9596</guid>
		<description>Thank Alex very much! It work for me.</description>
		<content:encoded><![CDATA[<p>Thank Alex very much! It work for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dani Tinez</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/comment-page-1/#comment-8786</link>
		<dc:creator>Dani Tinez</dc:creator>
		<pubDate>Wed, 29 Dec 2010 16:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-8786</guid>
		<description>Thanks this worked for me.</description>
		<content:encoded><![CDATA[<p>Thanks this worked for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xylaq</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/comment-page-1/#comment-7353</link>
		<dc:creator>xylaq</dc:creator>
		<pubDate>Thu, 25 Mar 2010 16:28:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-7353</guid>
		<description>Try something like this....

linkBar.invalidateDisplayList();
linkBar.selectedIndex = 2

It works for ToggleButtonBar</description>
		<content:encoded><![CDATA[<p>Try something like this&#8230;.</p>
<p>linkBar.invalidateDisplayList();<br />
linkBar.selectedIndex = 2</p>
<p>It works for ToggleButtonBar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/comment-page-1/#comment-6044</link>
		<dc:creator>Drew</dc:creator>
		<pubDate>Sat, 17 Oct 2009 15:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-6044</guid>
		<description>I&#039;m trying to remove all spacing between linkbar link buttons, I have a design that calls for the links to be stacked vertically with 5px of space between them, I&#039;ve cleared out all padding, for the linkbuttonstyles, and removed vertical gap, and set separator width to zero. What am I missing it seems like this shouldn&#039;t be that hard? Any help is much appreciated thanks!</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to remove all spacing between linkbar link buttons, I have a design that calls for the links to be stacked vertically with 5px of space between them, I&#8217;ve cleared out all padding, for the linkbuttonstyles, and removed vertical gap, and set separator width to zero. What am I missing it seems like this shouldn&#8217;t be that hard? Any help is much appreciated thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flexman</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/comment-page-1/#comment-2317</link>
		<dc:creator>Flexman</dc:creator>
		<pubDate>Fri, 22 May 2009 23:19:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-2317</guid>
		<description>Helps is I use the right tags... ;)

&amp;lt?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt
&amp;ltmx:LinkBar xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; itemClick=&quot;myFunc(event)&quot;&amp;gt

&amp;ltmx:Script&amp;gt
    	&amp;lt![CDATA[

		import mx.events.ItemClickEvent;
		import mx.controls.Button;

		private function myFunc(event:ItemClickEvent):void
		{
  			var n:int = this.numChildren;
        	for (var i:int = 0; i
    &amp;lt/mx:Script&amp;gt

&amp;lt/mx:LinkBar&amp;gt</description>
		<content:encoded><![CDATA[<p>Helps is I use the right tags&#8230; ;)</p>
<p>&amp;lt?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&amp;gt<br />
&amp;ltmx:LinkBar xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221; itemClick=&#8221;myFunc(event)&#8221;&amp;gt</p>
<p>&amp;ltmx:Script&amp;gt<br />
    	&amp;lt![CDATA[</p>
<p>		import mx.events.ItemClickEvent;<br />
		import mx.controls.Button;</p>
<p>		private function myFunc(event:ItemClickEvent):void<br />
		{<br />
  			var n:int = this.numChildren;<br />
        	for (var i:int = 0; i<br />
    &amp;lt/mx:Script&amp;gt</p>
<p>&amp;lt/mx:LinkBar&amp;gt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flexman</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/comment-page-1/#comment-2316</link>
		<dc:creator>Flexman</dc:creator>
		<pubDate>Fri, 22 May 2009 23:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-2316</guid>
		<description>This allows you to use the LinkBar without a viewstack when selecting an index...</description>
		<content:encoded><![CDATA[<p>This allows you to use the LinkBar without a viewstack when selecting an index&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/comment-page-1/#comment-2319</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 22 Sep 2008 17:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-2319</guid>
		<description>You can try this code:
&lt;pre class=&quot;code&quot;&gt;
linkBar.dataProvider=null;
linkBar.dataProvider=arr;
linkBar.selectedIndex=event.index;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>You can try this code:</p>
<pre class="code">
linkBar.dataProvider=null;
linkBar.dataProvider=arr;
linkBar.selectedIndex=event.index;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sohail</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/comment-page-1/#comment-2318</link>
		<dc:creator>Sohail</dc:creator>
		<pubDate>Wed, 13 Aug 2008 09:35:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-2318</guid>
		<description>True this will not work &quot;linkBar.selectedIndex = some_value&quot;. To do this make your own custom linkbar let say call it myLinkBar

==========================================================================






==========================================================================

And then in the itemClick (&lt;code&gt;itemClick=&quot;myFunc(event)&quot;&lt;/code&gt;) do the following:-

&lt;pre class=&quot;code&quot;&gt;
private function myFunc(event:ItemClickEvent):void
{
    mylinkbar.setIndex(event.index);
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>True this will not work &#8220;linkBar.selectedIndex = some_value&#8221;. To do this make your own custom linkbar let say call it myLinkBar</p>
<p>==========================================================================</p>
<p>==========================================================================</p>
<p>And then in the itemClick (<code>itemClick="myFunc(event)"</code>) do the following:-</p>
<pre class="code">
private function myFunc(event:ItemClickEvent):void
{
    mylinkbar.setIndex(event.index);
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dom</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/comment-page-1/#comment-2315</link>
		<dc:creator>Dom</dc:creator>
		<pubDate>Tue, 08 Apr 2008 13:42:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-2315</guid>
		<description>It seems that linkBar.selectedIndex = some_value is not supported if the linkbar is not paired with a viewstack, which is also the implicit dataprovider, thus the issue mentioned above.
It&#039;s a bit of a pain...</description>
		<content:encoded><![CDATA[<p>It seems that linkBar.selectedIndex = some_value is not supported if the linkbar is not paired with a viewstack, which is also the implicit dataprovider, thus the issue mentioned above.<br />
It&#8217;s a bit of a pain&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

