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

Form with list

Participant ,
Apr 07, 2017 Apr 07, 2017

Copy link to clipboard

Copied

Hi

How can i create list  at form like this

Tryit Editor v3.3

Not necessarily multiple list but i need view few options on screen

Thanks

TOPICS
Scripting

Views

420

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

Community Expert , Apr 08, 2017 Apr 08, 2017

That's a problem in Windows 10 with (I think) CS6. The fix is simple: instead of adding the listbox to the window, add a dummy group to the window and add the listbox to that dummy. Change the first three lines as follows:

var w = new Window ("dialog");

var dummy = w.add ("group")

var myList = dummy.add ("listbox", undefined, ["one", "two", "three"], {multiselect: true});

Note that you should set the multiselect property.

P.

Votes

Translate

Translate
Engaged ,
Apr 07, 2017 Apr 07, 2017

Copy link to clipboard

Copied

Hi,

Try this..

var w = new Window ("dialog");

var myList = w.add ("listbox", undefined, ["one", "two", "three"]);

var print = w.add ("button", undefined, "Print");

print.onClick = function ()

{

for (var i = 0; i < myList.items.length; i++)

$.writeln (myList.items.text);

}

w.show ();

Thanks

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.

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
Participant ,
Apr 07, 2017 Apr 07, 2017

Copy link to clipboard

Copied

I don't know why but i see empty list

screen.jpg

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
Community Expert ,
Apr 08, 2017 Apr 08, 2017

Copy link to clipboard

Copied

That's a problem in Windows 10 with (I think) CS6. The fix is simple: instead of adding the listbox to the window, add a dummy group to the window and add the listbox to that dummy. Change the first three lines as follows:

var w = new Window ("dialog");

var dummy = w.add ("group")

var myList = dummy.add ("listbox", undefined, ["one", "two", "three"], {multiselect: true});

Note that you should set the multiselect property.

P.

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
Participant ,
Apr 08, 2017 Apr 08, 2017

Copy link to clipboard

Copied

LATEST

Thank you very much

You are the best

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