How do I make a frame expand to fit its content like when sending a message in discord?
My game:
Discord:
How do I make a frame expand to fit its content like when sending a message in discord?
My game:
Discord:
You can enable TextScaled which will automatically scale your text based on its length. If you want to make it so it has multiple lines, you could do that too!
You can use TextFits to see if the text fits in the TextBox and increase the Y size if it doesn’t fit.
True, thats what I meant too. Normally you can’t enable TextFits on is own, TextScaled needs to be enabled for it to work
It doesn’t work, what I want is to make a new line each time the text doesn’t fit in the frame.
Yes, that’s what TextWrapped is for. Once the text reaches the edge of the frame, it creates a new line under the previous one
But does it increase the size of the textlabel?
You don’t need to enable TextScaled for TextFits to work. TextFits is a read only property that tells you whether the text fits within the bounds of the TextBox. If your text does not fit, it will be false; if your text fits, it will be true. You don’t need to enable TextScaled to use it.
What I’m trying to say is you can check the TextFits value to see if it’s true or false: if it is false you can increase the size of your TextBox so that the text fits.