Skip to main content
Question

How to make a frame grow with text?

  • October 11, 2024
  • 3 replies
  • 1634 views

Elkin_Tat

I have a a text box within a frame that has a top and bottom border, like this:

image

When I add more text to the text box, I’d like the frame to expand to accommodate it, but I can’t seem to get the outer frame to change:

image

What I want to happen is for the frame to expand like this:

image

Any suggestions?

adTHANKSvance!

3 replies

Anais_Ferreira

Hello!
The Auto Layout function can help you.
Simply apply an auto layout to your frame (Shift+A or right-click on your frame and select “Add auto layout”) then, constrain its height according to its content, by applying the “Hug contents” mode in the right-hand side menu.

image

image

For more information, take a look at the auto layout tutorial and the object resizing tutorial

I hope it’ll help you 🙂


Ravi_Madhusanka
  • Select the frame and press Shift + A to add auto layout.
  • In the auto layout settings, set the width to fixed and height to hug contents. Add padding as needed.
  • Select the text layer inside the frame and set its width to fill container.

This will make the frame expand as the text grows, but keep its width fixed as desired.


Elkin_Tat
  • Author
  • 2 replies
  • October 11, 2024

Thanks, Anais and Ravi, I’ve been able to make an expanding frame!

Follow-up question: Currently the frame I’ve made only expands in the downward direction as text is added. Is there a way to make it expand both up & down, so the frame stays centered vertically?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings