# \[4.7.6\] \[UMG\] Chain of Widget-parents broken

**URL:** <https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009>\
**Category:** UI\
**Tags:** unreal-engine, bug-report, Widget, question, UMG\
**Created:** [April 22, 2015, 8:17pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009 "2015-04-22T20:17:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_cf61193c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cf61193c1](https://forums.unrealengine.com/u/anonymous_user_cf61193c1)\
**Post date:** [April 22, 2015, 8:17pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/1 "2015-04-22T20:17:38Z")

</div>

Hi!

The first control in a Widget Blueprint has no parent.

Have a look at this hierarchy:

![39763-capture_1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/8/6/c86359d0a00de78ace68971a70a636f8977d43fc.png)

If you put a widget with this hierarchy into another widget and display it in a hud i would expect the chain of parents to be like this:  
Viewport → MainUserWidget → CanvasPanel\_0 → ChildUserWidget → Button\_136 → Textblock\_0

Now check the validity of the parent ( GetParent() node ) of each control and widget.  
Everything will be valid except the parents of CanvasPanel\_0 and Button\_136.  
Both are the root controls in their UserWidgets.

I would expect the parent of Button\_136 to be ChildUserWidget, but in my case the parent is not set.  
This is probably a bug.

Happy hunting!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [April 22, 2015, 9:16pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/2 "2015-04-22T21:16:30Z")

</div>

Hello ,

Thank you for the information provided. However, I would like to ask you for more information regarding the accurate reproduction of this issue. In order to make sure that we are following the same steps, could you provide a more detailed set of steps in order to reproduce this issue on our end. Such information would include the methods that you are using to find the individual parents of the objects that you are testing.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cf61193c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cf61193c1](https://forums.unrealengine.com/u/anonymous_user_cf61193c1)\
**Post date:** [April 22, 2015, 10:13pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/3 "2015-04-22T22:13:09Z")

</div>

Sure thing. This is going to be a bit longer.

- Create a new Project - settings do not matter
- Create a new GameMode and a new Hud, Assign them to your World
- Create two new UserWidgets: MainWidget and ChildWidget

In Hud:

- Setup Eventgraph:

 ![39786-hud.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/c/d/3cd96c9c5129aa8dbdd5730617b0b8e909950b2d.png)

In MainWidget:

- Expose CanvasPanel (In my case its canvas panel 6) as Variable
- Setup Eventgraph:

 ![39787-mainwidget.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/d/50d5174b3e0d564e5255029929a232c386970d27.png)

In ChildWidget:

- Expose CanvasPanel (In my case its canvas panel 0) as Variable
- Setup Eventgraph:

 ![39788-childwidget.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/8/c0868bad9715901fb68ffc91b832405beedd8da5.png)

If you play this you will get two Printouts:

1. the parent of ChildWidget (self) is valid - this is Ok, because the parent is CanvasPanel\_6 of the MainWidget. We added it there.

2. the parent of CanvasPanel\_0 is not valid. This is the problem i found. I expected it to be ChildWidget.  
I think, if you get the parent of a lower level control and then the parent of the parent, then its parent and so forth - after a couple of iterations you should end up getting the top level widget. I this case this would be MainWidget.  
The GetParent()-Chain should be complete.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [April 23, 2015, 2:20pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/4 "2015-04-23T14:20:29Z")

</div>

Hello ,

I was able to reproduce the issue you are experiencing on our end. I have written up a report (UE-14292) and I have submitted to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.

Make it a great day

---

<div class="post-metadata">

**Author:** ![NickDarnell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NickDarnell](https://forums.unrealengine.com/u/NickDarnell)\
**Post date:** [April 23, 2015, 2:39pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/5 "2015-04-23T14:39:21Z")

</div>

Parents can only be UPanelWidgets currently, which the UUserWidget is not and likely wont ever be. Might change it in the future though, I’ve considered making GetParent return UWidget instead of UPanelWidget to make these sorts of relationships possible, but I’m afraid of breaking peoples existing code.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cf61193c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cf61193c1](https://forums.unrealengine.com/u/anonymous_user_cf61193c1)\
**Post date:** [April 23, 2015, 10:12pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/6 "2015-04-23T22:12:07Z")

</div>

Okay, i understand that.  
Are there any alternatives for me?

Im trying to build something like radio buttons.  
These consist of two parts, first the button widget and second a panel.  
The panel sort of takes care of the currently selected value. Each button reports changes up the chain to the panel. This is where my problem with GetParent() comes into play.

The only solution i see is to write a UWidget which contains everything i need and keep track of things myself.

---

<div class="post-metadata">

**Author:** ![NickDarnell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NickDarnell](https://forums.unrealengine.com/u/NickDarnell)\
**Post date:** [April 24, 2015, 3:10pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/7 "2015-04-24T15:10:12Z")

</div>

I wouldn’t build radio buttons in that fashion. Radio buttons are just Checkboxes all watching the same value, but for a different condition. I wouldn’t use actual buttons. I would just have each checkbox bound to a different function checking if its state is the current state, and I would have each of their check state change events setup to write their value.

Now if I had to do a TON of radio buttons, I would probably build a new UWidget that automatically generates a set of radio buttons based on a particular UENUM, or maybe a FName Array, something like that.

---

<div class="post-metadata">

**Author:** ![tas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tas](https://forums.unrealengine.com/u/tas)\
**Post date:** [August 18, 2015, 2:58am UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/8 "2015-08-18T02:58:39Z")

</div>

I have similar problem. I need to track origin of spawned button.

1. Create bunch of buttons
2. Each button creates anchored menu
3. each menu is populated with child buttons. Those buttons needs to know to which anchored menu they belong, so I can close it once button is pressed.

Hope it makes sense 🙂

Any quick workaround ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [August 18, 2015, 12:58pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/9 "2015-08-18T12:58:53Z")

</div>

Hello tas,

The issue that you have mentioned in your post is unrelated to the original thread. I will need you to create a new thread for this issue for tracking purposes. However, if I understood your question correctly a quick suggestion would be to use the “Get parent” node. If this doesn’t work you can reply with a link to your new thread and I will be happy to take a look.

Make it a great day

---

<div class="post-metadata">

**Author:** ![NickDarnell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NickDarnell](https://forums.unrealengine.com/u/NickDarnell)\
**Post date:** [August 18, 2015, 1:03pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/10 "2015-08-18T13:03:43Z")

</div>

GetParent wont work I’m afraid, the buttons are children of their layout panel, but their panel is parented to essentially no-one, because it more or less acts like its own window.

Anyway, we have a global function you can use to close popups generically, just call DismissAllMenus().

---

<div class="post-metadata">

**Author:** ![tas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tas](https://forums.unrealengine.com/u/tas)\
**Post date:** [August 18, 2015, 4:17pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/11 "2015-08-18T16:17:18Z")

</div>

exactly, I was relating to GetParent method.

Thanks for DismissAllMenus() ill give it a try. My main concern was, what if I have multiple open menus, then I would want to close only the one associated with button.

Its like having multiple inventories…

---

<div class="post-metadata">

**Author:** ![NickDarnell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NickDarnell](https://forums.unrealengine.com/u/NickDarnell)\
**Post date:** [August 18, 2015, 6:39pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/12 "2015-08-18T18:39:20Z")

</div>

Then you’ll have to pass information to the button so it knows who owns it.

---

<div class="post-metadata">

**Author:** ![tas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tas](https://forums.unrealengine.com/u/tas)\
**Post date:** [August 18, 2015, 6:54pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/13 "2015-08-18T18:54:06Z")

</div>

would you be so kind and show me example how to do this ?

Im not sure how to pass this information.

---

<div class="post-metadata">

**Author:** ![Xarol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xarol](https://forums.unrealengine.com/u/Xarol)\
**Post date:** [September 4, 2015, 3:08pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/14 "2015-09-04T15:08:09Z")

</div>

As the poster requests, it would be nice to be able to get the parent user widget in some way. It doesn’t have to be GetParent but some way of getting the parent would simplify lots of stuff where you build some logic into a custom widget that wants to communicate with the parent. Seems like it wouldn’t be too hard to add such a thing and would probably help a lot of UI designers. Thanks, -X

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [September 8, 2015, 7:12pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/15 "2015-09-08T19:12:04Z")

</div>

Hello Xarol,

The way that you would pass the information to the button is same way that you would for any user widget, you could store some info in a member variable that the button can access when clicked.

---

<div class="post-metadata">

**Author:** ![giffen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@giffen](https://forums.unrealengine.com/u/giffen)\
**Post date:** [May 22, 2016, 12:05am UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/16 "2016-05-22T00:05:50Z")

</div>

I know this is an old topic, but it occurred to me that rather than changing get parent, maybe you could add a “Get Parent User Widget” which could return a reference to the User Widget that holds the base canvas panel.

---

<div class="post-metadata">

**Author:** ![NickDarnell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NickDarnell](https://forums.unrealengine.com/u/NickDarnell)\
**Post date:** [May 22, 2016, 12:32am UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/17 "2016-05-22T00:32:51Z")

</div>

Technically - if you take any UWidget and call GetOuter that will give you the widget tree, if you call GetOuter on the widget tree, that should give you the userwidget.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9db972fb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9db972fb](https://forums.unrealengine.com/u/anonymous_user_9db972fb)\
**Post date:** [July 15, 2016, 8:48pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/18 "2016-07-15T20:48:05Z")

</div>

Is there any equivalent of GetOuter for blueprints? It appears that GetOuter is not available in blueprints.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [July 18, 2016, 3:35pm UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/19 "2016-07-18T15:35:49Z")

</div>

Hello Porobic,

I have written up a request (UE-33393) to expose GetOuter to blueprints and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available.

Make it a great day

---

<div class="post-metadata">

**Author:** ![Wufasa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Wufasa](https://forums.unrealengine.com/u/Wufasa)\
**Post date:** [November 17, 2016, 4:01am UTC](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009/20 "2016-11-17T04:01:42Z")

</div>

For anyone who stumbles upon this post, ['s Victory BP plugin] [1](https://forums.unrealengine.com/showthread.php?3851-(39)--s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required!/page44) has a node `Widget Get Parent Of Class` that finds a class by following the parent chain, it also handles the widget chain breaking mentioned in this question using GetOuter.

[Next page](https://forums.unrealengine.com/t/4-7-6-umg-chain-of-widget-parents-broken/316009.md?page=2)
