Remove from viewport... remove from parent???

I come to an understanding that remove from viewport has been changed to remove from parent in 4.6. But currently i’m having trouble getting the widget off my viewport as of 4.7.
The current settings i have is to use the start button on the gamepad to pause the game and bring up the menu. I am able to un-pause the game by pressing the start button again but the widget menu remains on the viewport as the game kept going.
How do i fix this?

The start button function has been set on the level blueprint and widget is the widget blueprint. For additional note, the widget is set on another level but uses the widget blueprint just to be clear. Is this the source of the problem?
Thanks in advance.

When you use the node “create widget” you create a new widget. And this is the one you remove when you “remove from parent”, why the first one is always here. You need to create a variable reference of your widget when you create it and use this to link to “target” input of “remove from parent”

Thanks for your reply. Sorry but i’m kind of new to this but i made a variable and stated it as user widget. How do i define the user widget to be the widget as i’m using as i have more than 1 in the scene? Or should i use other type of variable?

You can also just “GetWidgetsOfClass” … do a “ForLoop” … remove the item returned by the “ForLoop”.

It works!! Thank you soooo much!!! Been scratching my head for 2 days straight!

This is out of topic but how do i define an object in scene in a widget blueprint?

Rather create a new thread, this allows people to find solutions and learn along with you at the same time.

Ok thank you. I’ll post it after taking the necessary screenshots.

Using “get all widgets” of a type will be fine as long as you have only one widget of the same type. If you have more then all the widgets will be remove. The solution is as i said to drag a wire from the return value of the create widget, and do “promote to variable” Name this variable to a name related to the blueprint and use it to add to viewxport or remove from parent.

@Fen I know this was 4 years ago in regards to this thread. But I am trying to remove created widget after pressing the same key. However, all it does is keep creating more widgets ontop of the first. I setup a ‘onclicked’ remove parent and showed the cursor to allow it to be closed with a click. That works. I want it to work with pressing the same key to remove from parent. Please help?

I realize the QuestLogClient events are redundant for what I am trying to do. I have since removed them. However, still having the above issue.

Where do you **Set **Quest Log UI variable? Perhaps the var is always invalid. Set it after / before adding it to the viewport. Also, you create it at the very top just to remove it…

I figured it out. Thanks tough @Everynone