Copy link to clipboard
Copied
i want show alert with listbox items with line break
this is code i want simple modify to it
var dialog = new Window("dialog");
dialog.text = "Resize Layer with input Value - MohamedHameed-01033032007";
dialog.minimumSize.width = 375; dialog.minimumSize.height = 200;
var HWT=dialog.add("edittext", [0,0,89,25], "", { wantReturn:true});
var listBox = dialog.add("listbox", undefined ,
{
numberOfColumns: 1,
showHeaders: true,
//multiselect:true,
columnTitles: ["" + 'Name'] ,
columnWidths: [250],
columnheights:[50,50],
showHeaders:true
//columnTitles:['Filename']
});
listBox.size = [400, 150]
Add = dialog.add("button", [0,0,400,35], "Add");
Finish = dialog.add("button", [0,0,400,35], "Cancel/Reset");
Add.onClick = function() {
listBox.add("item", HWT.text);
}
Finish.onClick = function() {
for(var i = 0; i < listBox.items.length; i++) {
var listOne = listBox.items;
}
alert (listOne.join("\n"))
}
dialog.show()
Finish.onClick = function() {
var listOne = [];
for(var i = 0; i < listBox.items.length; i++) {
listOne.push(listBox.items[i]);
}
alert (listOne.join("\n"))
}
Copy link to clipboard
Copied
Finish.onClick = function() {
var listOne = [];
for(var i = 0; i < listBox.items.length; i++) {
listOne.push(listBox.items[i]);
}
alert (listOne.join("\n"))
}
Copy link to clipboard
Copied
Thank You Very much for help me