"Text Box" vs "Editable Text" widget

What is the difference between a “Text Box” widget and an “Editable Text” widget?

The underlying classes are UEditableTextBox (“Text Box”) and UEditableText (“Editable Text”) and their functionality looks very similar. They both seem capable of acceping input from the user and both have delegates for when the text changes or is committed:

When I asked about this in the past I was told that the “Text Box” widget doesn’t allow user input or the user can’t edit the input but I don’t understand what that means. Both of the widgets appear under the “Input” category and both allow the user to enter and edit text as far as I was able to tell.

Can someone give a concrete example to highlight the difference between the two? When would you choose to use one over the other?

The TextBox, as the name says… is a box… with background color and a better style system.
while the EditableText, again as the name says, is just the editable Text you can put inside f.e. a Border…

I understand there are cosmetic differences but I was more asking about functionality. I was told something about the text box not allowing user input, or not allowing the user to edit or change text in some way.

This post on reddit hints at something similar:
https://www.reddit.com/r/unrealengine/comments/d87hxf/what_is_the_difference_between_text_box_and/

It seems like both widgets allow the user to enter/edit text and both have a SetText() function to change the text to whatever is needed.

Does anyone know the difference in functionality that they are referring to?

there is no functionality difference, since both inherit from the same Class.
The TextBix is just an extented Version of the Editable Text.

i never experienced an input block for a TextBox.

The differences between a Text Box and Editable Text are pretty negligible in general. Both will allow you to create fields of text that a user can manipulate, however, the Text Box occurs within the bounds of a box and has additional features related to it.

These features include the ability to style the background as desired and in different states (hovered, normal, focused, read-only) in this regard, they make for great field entry boxes (usernames and passwords and such). Suffice it to say, the Editable Text would be like the base, parent, or stripped-down version of the Text Box and could be considered more lightweight and flexible.

In short, Text Boxes have a box and Editable Text does not.

Also, from memory UEditableTextBox is a single-line text entry while UEditableText can be multi-line…

Actually, in 5.1 at least, both have single line and multiline components.
image

1 Like

I think you just answered it then - it looks like that’s a new development, and they will be both be there to maintain compatibility:

image

1 Like