Make tabs display properly in TextObjects


Tabs are smaller than or equal to a single space when displayed in a Roblox TextObject.
That’s bad behavior. Please fix.

Within a TextBox/Label/Button, "\t" is displayed the same as " ".

I was wrong. They don’t display the same. It depends on the font! It doesn’t get it right, of course, but they are different!

Within a TextBox/Label/Button, "\t" is displayed smaller than or equal to a " ".

This means that any attempt at displaying indented text does not work.






Why is tab smaller than space?

I know some people will say to just do global substitution to multiple spaces:

	TextBox.Text = string.gsub(TextBox.Text, "\t", "    ")

This is flawed.
Not only will this mess up the user’s CursorPosition every time they indent, but it means that if they want to traverse it via the arrow keys or to backspace it, it becomes 4 key presses instead of 1.

Currently, I use global substitution but manually move the CursorPosition based on changes I make. I still have to work out exactly to solve the 4:1 keypress issue. Or…

Roblox should handle tabs properly, and we shouldn’t be forced to sacrifice UX, CPU, and development time for such a basic feature.

Back in 2015, @TheNexusAvenger made this very short feature request that says the opposite. This implies that, once upon a time, Roblox actually did allow tabs. We should go back to that, rather than remove core functionality from a vague 2 sentence request. (No hate to Nexus tho <3)


I’m working on a simple IDE for my console language and I’m somewhat stuck because of this. Nexus’s feature request is more of a result of incompetence (sorry :c) as they could have easily fixed the spam issue by limiting how many lines and width a message can take up.

1 Like

I’m working on a less-than-simple IDE and this is a huge roadblock for me too.

This really needs to be fixed.