Hello,
I've got a problem to update my DropDownList in my UI. I don't know how to change the value in this DropDownList. I've got a button in my UI which update my list, it works, but i don't know how i can repopulate my DropDownList .
A part of my code :
maListe:DropDownList{properties:{items:" + tableauAddMatte.toSource() + "}}\
function addMatte_update(){
var proj = app.project;
var tempTab = new Array();
for(var i=1;i<=proj.numItems;i++){//ca scanne les comps dans le projet
var numeros=i;
var myItems = app.project.item(i);
if (myItems instanceof FolderItem && myItems.name=="INK MATTES" ) {
for(var j=1;j<myItems.numItems+1;j++){
tempTab.push(myItems.item(j).name);
}
}
if(i==proj.numItems){
HERE I HAVE TO POPULATE MY DropDownList WITH THE CONTENT OF MY ARRAY "tempTab"
//alert(tableauAddMatte);
}
}
}
Thank you!
DropDownList update
Moderator: Paul Tuersley
-
- Posts: 81
- Joined: November 27th, 2012, 6:41 am
you can specify items as an array upon creation, but after you can only add them one by one.
remove all items from the list:
maListe.removeAll();
remove item k from the list:
maListe.remove(maListe.items[k]);
add one item to the list at index k
maListe.add("item", "xxx", k) // if k not specified, appends the items at the end
Xavier
remove all items from the list:
maListe.removeAll();
remove item k from the list:
maListe.remove(maListe.items[k]);
add one item to the list at index k
maListe.add("item", "xxx", k) // if k not specified, appends the items at the end
Xavier