The LinkBar expects the thing that is its dataProvider to tell it what to do. For example, using a ViewStack as the dataProvider will give the LinkBar the information it needs to know what is currently selected.
I'm not using a ViewStack, I just want a list of links basically - they're not tied to anything else other than another component listening for the itemClick event.
Is there anyway I can do it without a ViewStack etc.?
How about a ToggleButtonBar instead?
yes just make sure whatever you set to as a selecteditem is one of the items in components DataProvider list.(I think that will work)
Peter: Visually the LinkBar fits with what I want to do.
levancho: I'm not quite sure what you mean by that.
Back to original message. You said you set the LinkBar's selectedIndex to a different value and the LinkBar doesn't change. So if you have something like this:
<mx:Object label="Adobe" data="adobe.com" />
<mx:Object label="Amazon" data="amazon.com" />
<mx:Object label="ABC" data="abc.com" />
and at some point you do: bar.selectedIndex = 1 that Amazon won't be the selected LinkButton?
DEfusion --never mind does not apply to linkBar.
The links in a LinkBar do not have a selected state. That is why the component ignores when you set the selectedIndex. If you want the links to have a selected state, you'll have to switch to a ToggleButtonBar and style it to look like a LinkBar, which isn't too hard to do.