2 Replies Latest reply on Mar 13, 2009 1:56 PM by Dave Pepper

    List Box Dialog Object VB CS4 or CS2

    Dave Pepper
      It appears that the InDesign Dialog object doesn't allow you to place list boxes. Does anyone know a work around for this. I need to match up the items for two lists that can contain 40 - 50 items each. Any thoughts?
        • 1. Re: List Box Dialog Object VB CS4 or CS2
          [Jongware] Most Valuable Participant
          They have something called a drop down list:

          var aStringArray = new Array;
          

          aStringArray.push("Hello");
          aStringArray.push("World!");

          var myDialog = app.dialogs.add ({name:"My First Dialog",canCancel:true});
          with (myDialog)
          {
          with (dialogColumns.add())
          {
            with (dialogRows.add())
            {
             staticTexts.add ({staticLabel:"My List"});
              dropdowns.add ({stringList:aStringArray, selectedIndex:0});
            }
          }
          }
          I guess 'real' Windows Listboxes are not supported -- can't find them in the newer (CS3) ScriptUI as well.

          >..match up the items for two lists..

          How were you planning to 'match up' two listboxes? Perhaps you can place two dropdown lists side by side?
          • 2. Re: List Box Dialog Object VB CS4 or CS2
            Dave Pepper Level 1
            I thought about using drop-downs, but there are so many items in each list that it would look too busy. With list boxes, you just order the items as desired in each column and then reference the item index numbers (e.g. Item 1 in Column 1 is assciated with item 1 of Column two....)