What's the point of UEditableTextBox::IsPassword?

I see no difference whether i set it to true or false.

I was expecting that when set to true, the text would be hidden/replaced with stars but that doesn’t seem to be the case.

Am i missing something ?

Thanks

Cedric

Some precisions:

It works when set in the widget blueprint, or in the widget Initialize() function.

But it doesn’t work when called in a regular function.

I’d like to give to players the possibility to display/hide the password, so i need to be able to change this value at runtime, which doesn’t seem to work. Is that the expected behavior or should i open a bug report ?

Thanks

Cedric

Hey,

You can do the following, it should repro:

  • create a c++ project

  • create a class inheriting from UUserWidget

  • In this class, create a function containing:

    UEditableTextBox* EditableTextBox_ServerPassword = (UEditableTextBox*)(WidgetTree->FindWidget(FName(TEXT(“EditableTextBox_ServerPassword”))));
    EditableTextBox_ServerPassword->IsPassword = true;

  • in editor, create a widget BP inheriting from your c++ class and put in it an editable textbox named EditableTextBox_ServerPassword

  • call the function in runtime, then write in the textbox: the letters are still visible.

It should work during runtime. Could you please attach a repro case?

FYI: i tried to setup the same thing in BP only but the EditableTextBox is seen as a “Text Box Object Reference” and won’t plug in the SetIsPassword node, which only accpets “Editable Text Object Reference”.

There seems to be a confusion between both classes when creating them in a BP.

I was able to reproduce your issue and have submitted the necessary code changes to Epic for review, see https://github.com/EpicGames/UnrealEngine/pull/4664 . UEditableTextBox is supposed to have a SetIsPassword function that properly passes through the boolean to the Slate widget, accessing it directly as in the example doesn’t do that. I hope that helps. Cheers,

Thanks a lot !