<?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>Mon, 22 Mar 2010 09:31:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<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>
	<item>
		<title>By: Zuhair</title>
		<link>http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/comment-page-1/#comment-2314</link>
		<dc:creator>Zuhair</dc:creator>
		<pubDate>Sun, 16 Mar 2008 12:57:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-2314</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-page-1/#comment-2313</link>
		<dc:creator>Anome</dc:creator>
		<pubDate>Sun, 20 Jan 2008 20:11:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/20/setting-the-selected-index-of-a-flex-linkbar-control/#comment-2313</guid>
		<description>There is a bug, try to click on the LinkBar&#039;s items then use the slider : several items can be selected !
to be honnest, i fixed the problem by setting the &#039;enabled&#039; 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>
