We’re excited to announce support for TextBox scrolling on desktop platforms.
Text will now scroll when your cursor leaves the bounds of your TextBox to keep what you’re typing in view at all times. Multiline vertical scrolling is also supported. This new behavior allows users to edit longer text without needing to enable something like TextScaled, which often shrinks text to an unreadable size.
Example of TextBox scrolling
Example of multiline vertical scrolling
How do I use it?
This scrolling behavior is on at all times, but you need to make sure you don’t have any properties enabled that stop text from leaving the bounds such as TextScaled or TextWrapped. You’ll also probably want to enable ClipsDescendants so that the overflowing text doesn’t cover other interface elements.
If you encounter any issues, feel free to comment under this post or submit a bug report.
I think this will help with general readability of text when inputting things like applications or general short answers.
In addition to this, I think Roblox should be looking into automatic font size scaling across devices, we all know text scaled is a pain and not the best thing to use, and most of the time I end up using a solution based on screen aspect ratio to give a constant text size across my interfaces, something like this would be great.
I am once again asking for an automatic way of scaling text vertically to fit a desired number of lines. If I want a TextBox to accommodate 3 lines of text, the only way to do this currently is to set TextSize to AbsoluteSize.Y / 3 every frame. We should have an automatic way of doing this.
With this update, a feature like this is more important than ever.
I hope in the future they can add more GuiObjects or at least improve the ones we already have, and I hope in the near future they will take Flex elements out of beta, roblox is on a better way
Heavily agree! Not even just for TextBox, but TextLabels & TextButtons, I often just separate lines into their own label as an easy workaround. While it’s good to avoid TextScaled whenever possible, there are cases where it makes sense to use it.
Anyways, this feature was soooo needed, glad it’s here now! I had to implement this for a couple TextBoxes of mine, and it wasn’t that fun xD
First of all, small bug: if the textbox is centred, the cursor won’t centre back if it’s been moved to the side when scrolling.
Otherwise, can we expect a way to toggle this feature, and an option to change the scrolling direction to be vertical? I can see this being useful for multiline inputs, as looking at the demo, it feels very unnatural to present those scrolling horizontally. Take for example the text box I’m typing in right here on the DevForum, among basically every multiline input on websites.
Interesting, I’ve played some experiences that already do this. It must’ve been a home-made solution, which I guess goes to show how much this was needed!