Skip to main content
dublove
Legend
Jul 29, 2025 12:41 PM UTC
Answered

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

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];

 

dublove
dubloveCorrect answer
Legend
Jul 30, 2025 2:36 AM UTC

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);

6 replies

rob day
Community Expert
Community Expert
Jul 29, 2025 9:52 PM UTC

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
dublove
dubloveAuthor
Legend
Jul 30, 2025 1:22 AM UTC

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?

Translate
m1b
Community Expert
Community Expert
Jul 29, 2025 1:03 PM UTC

What's your question @dublove ?

Translate
dublove
dubloveAuthor
Legend
Jul 29, 2025 2:46 PM UTC

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
m1b
Community Expert
Community Expert
Jul 29, 2025 7:10 PM UTC

So what's your question?

Translate