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

Wrap text in drop down menu

New Here ,
Jan 29, 2017 Jan 29, 2017

Is a way I can wrap the text so it can be fully read. Each menu option might be long as it is for narration purposes

TOPICS
PDF forms
9.0K
Translate
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 ,
Jan 30, 2017 Jan 30, 2017

Yes, but it's not a good idea. The text in drop-downs must be a single line for them to work correctly.
You need to think of another solution to this problem.

Translate
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
Contributor ,
Jan 30, 2017 Jan 30, 2017

The other solution can be the code that I used to wrap manually my text. See sample here under

Here the result compared with the wrap text

Screen Shot 2017-01-30 at 15.36.46.pngScreen Shot 2017-01-30 at 15.39.09.png

Translate
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
New Here ,
Dec 27, 2019 Dec 27, 2019

This is a pretty old post. And I can't seem to get the "\r" to work. I'm surprised Adobe hasn't provided a solution for this. Anyone else have any luck?

Translate
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 ,
Dec 27, 2019 Dec 27, 2019
LATEST

You need to use "\n", actually. I don't know what the above post is referring to.

Here's the basic code that does it:

 

this.getField("Dropdown1").setItems(["Item 1", "Item 2\nLine 2 of Item 2", "Item 3"]);

You'll see for yourself that it doesn't work very well, unless all values have the same number of lines in them.

Translate
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