Copy link to clipboard
Copied
I would like to increase the "EditText" element when plus button clicked.
My test script does not allow me to increase the element...
Could anyone please tell me how to do this?
thank you.
var dialog = new Window ("dialog", "Test", undefined, {resizeable:true});
var group_ui = dialog.add("group", undefined, {name: "group_ui"});
group_ui.orientation = "row";
var plusBtn = dialog.group_ui.add("button", undefined, undefined, {name: "plusbtn"});
plusBtn.text = "+";
var minusBtn = dialog.group_ui.add("button", undefined, undefined, {name: "minusbtn"});
minusBtn.text = "-";
function ViewEditTextList(){
dialog.statictext = new Array();
for (i=0; i<myCount; i++){
dialog.statictext[i] = dialog.add("edittext", undefined, undefined, {name: "EditText"});
dialog.statictext[i].text = "text_test"
}
}
var myCount = 2;
plusBtn.onClick = function(){
myCount = myCount+1;
ViewEditTextList()
}
ViewEditTextList()
dialog.show();
Does it help to call
and/or
after adding more text fields?
Copy link to clipboard
Copied
Does it help to call
and/or
after adding more text fields?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more