I have a LinkBar that is not highlighting the selected link. Is there an issue with the LinkBar?
Here is my code:
<mx:LinkBar id="languageTypeButtons"
selectedIndex="0"
itemClick="languageType_changeHandler(null)"
dataProvider="{languageTypes}">
</mx:LinkBar>
<s:ArrayList id="languageTypes">
<fx:String>{MXML}</fx:String>
<fx:String>{HTML}</fx:String>
<fx:String>{ANDROID}</fx:String>
</s:ArrayList>
public static const HTML:String = "HTML";
public static const MXML:String = "MXML";
public static const ANDROID:String = "Android";
I'm using Flex 4.6 and I have Spark components mixed with mx components. If I set the selectedIndex in the LinkBar MXML then it stays stuck on that item visually. Programmatically it is changing and the selectedIndex shows the right values.
Update:
Couldn't figure this out so I'm using ButtonBar. Unfortunately ButtonBar seems to hang the whole app if you don't set the dataProvider or set it to an ArrayList with no items.
selectedIndex
of aLinkBar
control if you're using an array of objects/strings as a data provider. Although you could set theselectedIndex
if you were using aViewStack
as a data provider or used aToggleButtonBar
control instead of aLinkBar
. – akhil_mittal