开发者

Flex - combobox data

I'd like to create a combobox which will get users from an arrayList & another field for creating a new user.

for example when i open the combobox i'd like to see the r开发者_StackOverflow中文版ows :

Create new user

User A

User B

where the users come form an arrayList and the "create new user" option is always there.

How can I do it?

P.S

I don't wan't to add "create new user" obj to the arryList - so this is not a desired solution.

Thanks for your help,

Dan


Just create an intermediate ArrayList, add the "create new user" option to it, copy all the elements from the other ArrayList, and finally assign it to the combobox:

var cbArray = new ArrayList();
cbArray.push("Create new user ");
for (int i = 0; i < yourArrayList.lenght; i++) {
    cbArray.push(yourArrayList[i]);
}
// Then assign cbArray to the combo box
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜