• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

show alert with listbox items with line break

Enthusiast ,
Sep 05, 2023 Sep 05, 2023

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()
TOPICS
Actions and scripting , SDK

Views

151

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Sep 05, 2023 Sep 05, 2023
Finish.onClick = function() {
    var listOne = [];
    for(var i = 0; i < listBox.items.length; i++) {
        listOne.push(listBox.items[i]);
    }
    alert (listOne.join("\n"))
}

Votes

Translate

Translate
Adobe
People's Champ ,
Sep 05, 2023 Sep 05, 2023

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"))
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 05, 2023 Sep 05, 2023

Copy link to clipboard

Copied

LATEST

@r-bin 

Thank You Very much for help me

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines