<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Setting the selected index of a Flex LinkBar control</title>
	<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Tue, 14 Oct 2008 02:05:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Alex</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-15794</link>
		<author>Alex</author>
		<pubDate>Mon, 22 Sep 2008 17:20:00 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-15794</guid>
		<description>You can try this code:
&lt;pre class="code"&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-14664</link>
		<author>Sohail</author>
		<pubDate>Wed, 13 Aug 2008 09:35:43 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-14664</guid>
		<description>True this will not work "linkBar.selectedIndex = some_value". To do this make your own custom linkbar let say call it myLinkBar

==========================================================================


	
		
	

==========================================================================

And then in the itemClick (&lt;code&gt;itemClick="myFunc(event)"&lt;/code&gt;) do the following:-

&lt;pre class="code"&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-11250</link>
		<author>Dom</author>
		<pubDate>Tue, 08 Apr 2008 13:42:27 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-11250</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'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>
	<item>
		<title>By: Zuhair</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-7596</link>
		<author>Zuhair</author>
		<pubDate>Sun, 16 Mar 2008 12:57:03 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-7596</guid>
		<description>Hi,

the actionscript code is not working:


    


Could you pleas check that

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>the actionscript code is not working:</p>
<p>Could you pleas check that</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anome</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-6231</link>
		<author>Anome</author>
		<pubDate>Sun, 20 Jan 2008 20:11:33 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-6231</guid>
		<description>There is a bug, try to click on the LinkBar's items then use the slider : several items can be selected !
to be honnest, i fixed the problem by setting the 'enabled' property of each LinkButton to false, except the one that should be selected.</description>
		<content:encoded><![CDATA[<p>There is a bug, try to click on the LinkBar&#8217;s items then use the slider : several items can be selected !<br />
to be honnest, i fixed the problem by setting the &#8216;enabled&#8217; property of each LinkButton to false, except the one that should be selected.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
