S_Black Posted September 23, 2020 Share Posted September 23, 2020 I have a client requesting a task I am unsure how to implement. There is a text frame of variable content. By default I allowed text to shrink to fit a frame, but the client is asking for the text box to shrink to the size of the text... or expand if necessary. Is that even possible? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted September 24, 2020 Share Posted September 24, 2020 (edited) Yes, it's possible. Though how to accomplish this depends on the parameters. Is it a single line of text, or multiple lines? Also, how exactly do you want the frame to be adjusted? Do you want it to get taller but keep a constant width? Or do you want it to expand or shrink proportionally? And should this affect other content on the page as well? The simplest thing is to put the text into a table with a single cell. You can set the cell's (or table's) borders and fill color as desired. Then, like with any table, the cell will expand vertically as needed to accommodate its content, though the width will be constant (at whatever width you specify for the single column). In FusionPro 11.1 and later, you can do this with almost no JavaScript! If it's a single line of text, you can do the same thing, but measure it first to determine the width to set for the cell (column), similar to this post. Other kinds of resizing may require different strategies. Again, if you can give me some specifics about what results you're trying to achieve, I can offer more specific suggestions. Note that all of the above can be done with any version of FusionPro, as all you're really doing is setting down a table. If you're composing via FusionPro VDP Producer or Server (or via an application such as MarcomCentral which uses FP Server), then you can actually modify the size and position of any frame, and even create new frames, programmatically, per-record, with JavaScript, which offers more flexibility. Edited September 24, 2020 by Dan Korn Quote Link to comment Share on other sites More sharing options...
S_Black Posted September 25, 2020 Author Share Posted September 25, 2020 (edited) Thanks Dan, I have a few screen caps. Capture1: Text with Variable fields Capture2: Example of a lot of content Capture3: Example of a little content. I've never used the table feature and made an attempt to create one, but I'm stuck. I placed the text in a Formatted Text Resource and create the table from a Rule that returned the resource, but the table data is invalid. I need to read up on the table feature. It looks like a powerful feature, but I haven't had a need to use it thus far. The width can be fixed, and the text should wrap around the table when necessary. Edited September 25, 2020 by S_Black Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.