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

How can overflow be automatically displayed when a text box is moved into the layout?

Guide ,
Jul 29, 2025 Jul 29, 2025

After moving horizontally into the layout, if sb[2] exceeds the bottom edge, overflow is displayed.
This is instead of expanding, as the text may be very long.

sel[j].visibleBounds = [sb[0], lcb, sb[2], rcb];

 09.png

TOPICS
How to , Scripting
349
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

correct answers 1 Correct answer

Guide , Jul 29, 2025 Jul 29, 2025

This seems feasible:

 
var pb = sel[j].parentPage.bounds;
var bm = pp.marginPreferences.bottom.
. . . . . .
sel[j].visibleBounds = [sb[0], lcb, pb[2] - bm, rcb];
sel[j].fit(FitOptions.FILL_PROPORTIONALLY);

//sel[j].fit(FitOptions.FRAME_TO_CONTENT);
Translate
Community Expert ,
Jul 29, 2025 Jul 29, 2025

What's your question @dublove ?

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
Guide ,
Jul 29, 2025 Jul 29, 2025

I am researching text box adaptation columns, but the text box is too long, and I don't want it to exceed the page layout.

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 ,
Jul 29, 2025 Jul 29, 2025

So what's your question?

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 ,
Jul 29, 2025 Jul 29, 2025

You don’t know how much content is oveflowing, so you would have to fit the frame to the content

 

app.activeDocument.selection[0].fit(FitOptions.FRAME_TO_CONTENT)

 

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
Guide ,
Jul 29, 2025 Jul 29, 2025

After FitOptions.FRAME_TO_CONTENT, the text box will exceed the page margin.

I want the textFrame display a red “+” with the text “overflow text” when the sb[2]  exceeds the bottom edge.

 

I don't know what mechanism causes it to go all the way to the bottom of the interface.
Is it possible to stop the expansion at the bottom of the page?

088.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
Guide ,
Jul 29, 2025 Jul 29, 2025
LATEST

This seems feasible:

 
var pb = sel[j].parentPage.bounds;
var bm = pp.marginPreferences.bottom.
. . . . . .
sel[j].visibleBounds = [sb[0], lcb, pb[2] - bm, rcb];
sel[j].fit(FitOptions.FILL_PROPORTIONALLY);

//sel[j].fit(FitOptions.FRAME_TO_CONTENT);
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