Problem with changing TextBox Foreground Color in blueprint

Hello.

I want to change the text color in a TextBox widget in bluebrint, but can’t seem to get it to work. As opposed to the Static Text widget you can’t just change the color and opacity - you have to change the widget style. However, when I do this (and change the Foreground Color in Style) nothing happens. The text color remains in default color.

I’m guessing that this is a bug. But does anyone know a workaround?

Thanks!

(This problem is very easy to replicate:

  1. Create a user widget.
  2. Add a TextBox.
  3. In Event Construct, insert node Set Style from the TextBox variable.
  4. Make an EditableTextBoxStyle from Set Style.
  5. Make a SlateColor with a diffrent color than the default value, and connect this to the Foreground Color input in EditableTextBoxStyle.
  6. Play. You will see that the color does not change.)

Hello ,

This is a known issue, I have provided a link to the public tracker. Please feel free to use the link provided for future updates. I do not have a workaround for this issue at this time.

Link: Unreal Engine Issues and Bug Tracker (UE-37829)

Make it a great day

Hey,

I expect you not to have this issue anymore, but still, for anyone coming across this exact problem:

This is not a bug, it’s (as I understand it) working as intended.
You are making a style which you only feed with the foreground color, if you have anything written in that widget, it’s probably disappearing and only leaving that color.

You have to get your existing widget, getting it’s style, breaking it, feeding everything but the color from the broken style to a “make style” and additionally feed the color you choose to it (like in the picture above)

The mistake here was to create a style that only has a color. No font size, background color etc.

1 Like

To extend what @Nickcha said: