flex linkbar seaching for index of a given label

173 views Asked by At

I need to find the index of a linkbar, only got the label. Like array.indexOf(value) ?

1

There are 1 answers

0
Wade Mueller On

You can iterate through the objects in the LinkBar's dataProvider and check for a match. This is dependent upon the structure of the objects in the dataProvider. If they are simply strings in an array, you can do pretty much what you stated in your question:

(myLinkBar.dataProvider as Array).indexOf(value);

Hope that helps.