开发者

flex linkbar seaching for index of a given label

开发者 https://www.devze.com 2023-01-19 12:28 出处:网络
I need t开发者_开发技巧o find the index of a linkbar, only got the label. Like array.indexOf(value) ?You can iterate through the objects in the LinkBar\'s dataProvider and check for a match.This is de

I need t开发者_开发技巧o find the index of a linkbar, only got the label. Like array.indexOf(value) ?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消