Download

Text Box (Multi-Line): How do I make it Read-Only??

So in the UMG editor you can pick the Text Box (Multi-Line) widget and in the “Style” section you have “Read Only Foreground” as a property however nowhere can I set the box to “Read Only”.

I can Disable the box but this makes it completely inoperable so I can’t scroll in it if the text exceeds the text area.

Is this an oversight or am I missing something?

Still need some word on this.

Place regular text(with auto wrap on) inside a scroll box.

That’s not really a solution, that’s a temporary fix.

Still need some word on this.

Still need some word on this.

In what way is it not a solution?

It does not give me the “Read-Only” Checkbox that the Text-Box (Multi-line) is missing.

Disable the Text-Box when you want it as read-only. The scrollbox controls the scrolling, so you can still scroll.

Disabling the box makes it very hard to read.

Yeah, googling doesn’t seem to reveal any way to remove the tinting, so the text comes out all grey. Annoying.

An idiotic workaround would be to create an identical regular text in place of the text box when you disable it. Will try to mess around with it tomorrow to see if I can find a better solution.

Almost even more idiotic, but it worked in my case (game instruction pages):
Render the text as textures. You only need black/white, so you can cram up to 4 “pages” of text in a single texture. Then create the appropriate masked materials…
The textures itself dont need to be that big in resolution and they compress fairly well, so not too much trouble there…
The only drawback is that editing text on-the-fly is not so easy anymore…

I’ve logged this as a bug report since it doesn’t seem to have been already.

Bug report

hi i came across same problem , the multiline text box was used to display chat messages but then i realised players could click on the text box and change all the mesages . i first tried just using disable tick box and although this does make it read only it causes the text to be completly grey and other problems, in the end i just did this and set it to hit test invisible which works for me

0f5bd71592f84d58a71fc31b89b99f8a.png

Actually there’s a better way you can overide a function and handle the events yourself I’m at work but I’ll post screenshot later

ok so in youre widget override the function OnPreviewKeyDown

130ff8d06935fb3575450f2b1ad86f8f683e5c9b.png

in this function get a reference to the textbox then do a check to see if it has focus then handle the events

4b6fe5d3fddfdf141d8eaf09895d895c0e2c2d96.png

all im doing here is simply if the widget has focus clear the focus this makes it behave like read only but you can still scroll , highlight text etc

I filed a bug in the new system for this, since I just encountered the following behaviour in Unreal 4.22.3 under MacOS 10.14.6:

Screenshot-20190915-at-14.03.24.png

Screenshot-20190915-at-14.03.35.png

Text Box and Editable Text yields two different types of classes, but Text Box (Multi-Line) and Editable Text (Multi-Line) yields the same editable class.

I hope that this is a MacOS specific bug and that there really exists a multi line text box that can’t be edited in 2019 for Unreal.

I tried on PC now as well, so sadly doesn’t seem to be limited to MacOS.

The weird thing too is that when you look at the options, the Editable Text (Multi-Line) is the one which has most in common with the single line Text Block…

I did this