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.
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.