Automatic Size Property Enquriy

Hello,

I am designing a scrollable text frame that contains a significant amount of text. However, I have encountered an issue when learning that the automatic size property will stop scaling when the child’s size meets the parent’s size. This presents an issue when using it inside a scrolling frame, as I want it to scale to an unlimited amount based on the text contents. Then the scrolling frame will scale based on that; however, I do not know if there is a built-in way to do this or if I would just connect a changed event to the text property and scale it that way.

Anyways, I thought I would just create a quick post to see if anyone had a simple solution before I go into programming the automatic size manually.

Thank you,
TwoBrake

First, enable the TextLabel’s TextWrapped property.
After that, set the TextLabel’s AutomaticSize property to Y if vertical scrolling, or set to X for horizontal scrolling (or XY for combined scrolling), and so the TextLabel’s size will adapt to the text’s length, making the ScrollingFrame adapt to its automatic size as well.

Also, avoid using the TextScaled property alongside AutomaticScaling because they tend to interfere with each other (the text will scale to the TextLabel’s size, never triggering the auto-scale); Instead, set a fixed TextSize property.

1 Like

This technically wouldn’t work because the AutomaticSize property on a child element is based on the parent’s absolute size, not it’s canvas size. I however solved the issue by manually implementing this making use of :GetTextSize() method on the TextService class.

Thanks for your help though!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.