Apparently the visual selection in a LinkBar only works when its dataprovider is a collection of DisplayObjects (e.g. ViewStack).
The ViewStack doesn't even have to be visually present (it has to be on the display list though), so the following will work ;-) <mx:LinkBar id="_lbar" dataProvider="_vstack" /> <mx:ViewStack id="_vstack" includeInLayout="false" visible="false"> <mx:Canvas label="Item 1" /> <mx:Canvas label="Item 2" /> <mx:Canvas label="Item 3" /> </mx:ViewStack> And of course you can extend LinkBar or NavBar and make it work properly with non display objects. regards, Muzak ----- Original Message ----- From: "dorkie dork from dorktown" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, December 28, 2007 7:13 PM Subject: [flexcoders]How to change the selectedIndex of a LinkBar > No matter what I try I cannot change the "selected" item in the linkbar. Try > this example. How do I change what item is visually "selected". > > <?xml version="1.0" encoding="utf-8"?> > <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute"> > <mx:LinkBar x="10" y="19" dataProvider="['item 1', 'item 2', 'item 3']" > selectedIndex="0" color="#D41010" disabledColor="#1D7AC1" > disabledOverlayAlpha="1" dropShadowEnabled="true" dropShadowColor="#000000" > errorColor="#AC0909"> > </mx:LinkBar> > </mx:WindowedApplication> > > > BTW does it seem confusing that the selected color and selected text don't > refer to the item that the user is on or has already clicked? > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

