Skip to main content
Solved

Can I resize text boxes within an autolayout frame?


Hey. Like I said in the topic subject, I’d like to resize text boxes using autolayout. I don’t mean scale, but adapt the text containers to the size of the frame. Is that possible? Thank you in advance, guys.

Best answer by Wolf_Hadson

Yes, pay attention to whether the object you’re trying to change is either fixed or hug in width and height, these settings are often overlooked by new designers and they are very important to get a good result.

If the text is set to fixed width and hug height, this means that when you type enough characters to fill the selection this will create a new text line and also broaden the selection accordingly.

I hope that solves the problem, if not, let me know and I’ll cover all other possible solutions.

Have a great day and best of luck!

View original
This topic has been closed for comments

5 replies

Gleb
  • Power Member
  • 4707 replies
  • June 12, 2023

Set text to fill container


Wolf_Hadson

Yes, pay attention to whether the object you’re trying to change is either fixed or hug in width and height, these settings are often overlooked by new designers and they are very important to get a good result.

If the text is set to fixed width and hug height, this means that when you type enough characters to fill the selection this will create a new text line and also broaden the selection accordingly.

I hope that solves the problem, if not, let me know and I’ll cover all other possible solutions.

Have a great day and best of luck!


Hey, thank you guys, somehow I didn’t pay attention to this and it was so simple!


This may be a similar question, but it’s driving me crazy. I’m trying to create a frame (can be a square box), then have text within that frame. If I type, the frame should expand with the text box, but I cannot figure out how to do that. Please help!

Loom recording example


Gleb
  • Power Member
  • 4707 replies
  • October 31, 2023

Learn the basics of auto layout: it is fixed so it wouldn’t be resized with content.


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