1 Reply Latest reply on Mar 30, 2015 1:05 AM by try67

    How to center text script for drop down entries


      I am working on another custom pdf for work that will have many many drop downs with long lists of data in it.  The way I have been entering the names or data into to center it is, hit space bar several times, type out name and then add.  If it looks nearly centered i leave it, if its off i'll add or remove spaces and re-add it and delete the previous one.  But this takes alot longer to do.  Is there any script or even another way of centering the text automatically when chosen?

      Below is a small screencapture showing what i'de like all the entries to appear without doing it the way i've been doing it.


        • 1. Re: How to center text script for drop down entries
          try67 MVP & Adobe Community Professional

          The best way to do it and get consistent results is by using tabs. However, you can't use tabs with the built-in Properties dialog, only by using a script.

          For example, something like this:

          this.getField("Dropdown1").setItems(["\t1", "\t2", "\t3"]);


          It's even possible to create a script that will convert all the items in all of your drop-down fields to have a tab in them (even if they already have spaces), but that is more complex.