[REQUEST] Access inherited UI elements from child UserWidget

Currently, when you have a child widget that inherits a parent widget, there is no way of accessing the parent UI elements from the child UI (in the Designer View).

Say I have a custom button user widget (MyBaseButton) and a custom canvas (MyButtonMenu) that gets some MyBaseButtons and places them in a specific way.

Now I need a button that does everything MyBaseButton does, but is displayed slightly differently, so I create a new user widget, MySpecialButton which inherits MyBaseButton. But now I have no way of changing any property of MyBaseButton. Anything I add to the Designer view hierarchy makes the MyBaseButton disappear. If I just want MySpecialButton to be a scaled version of MyBaseButton, I can’t do that.

And creating another widget MyOtherButton that does not inherit MyBaseButton but instead has MyBaseButton as a child doesn’t solve this since I still want MyButtonMenu to layout the button.

Can anyone offer any insight on this issue I’m facing?

Are there any plans to improve UserWidgets in this aspect?

Thanks a lot!

1 Like

This is one of the oldest problems I’ve faced and has annoyed me greatly.

I support a feature request for this.

Here’s a step-by-step guide on how I created my own fix for it.

  1. Create parent widget, including functionality and design elements
  2. Copy the widget and rename it (I usually add _child)
  3. Delete every function from the _child widget (functions you created in the parent)
  4. Rename all your widget design elements (I change their variable names to have an _c)
  5. Delete all variables which are not widgets (bools, ints, etc)
  6. Re-parent blueprint to your parent widget
  7. Modify your child blueprint on construct and make sure you set your _c variables to the parent variables (so if you have a border in your parent named frame and the one in child named frame_c, on construct set frame to frame_c)

Now you have access to all your functions and variables from your parent widget in a child widget that you can manipulate design elements for.

From this point, you can create multiple child widgets with various changes by simply duplicating the _child widget.

+1 this is the equivalent of having blueprint actors unable to modify inherited components. It makes things like adding animation incredibly painful, plus you don’t even get an accurate display of your userwidget in the designer because the inherited items don’t draw there. Majin’s workaround is very labor intensive and at least double’s the memory footprint of your class.

It pains me greatly that a powerful engine like UE has not yet addressed this, but I appreciate this workaround greatly.

Does anyone know if there is a way to use this workaround with Animations of Widgets? I can use this workaround with the other widget design elements as outlined by MajinSephiroth, but I can’t seem to do it with Animations because UE4 won’t allow me to set the Animation references of parent widgets to anything.

Or has a better solution come up since the last post on this thread?

This is definitely one of the most annoying limitations of UMG. I would love if this could be addressed!

It’s 2024, we’re on 5.4.1, i still can’t see the components of my parent widget in my child… This is such a big limitation. F in chat boys…

UE’s handling of UI in the editor is painful when compared to modern engines, it really does need a massive refactoring effort.

That said, I can offer the following to anyone finding themselves here when searching widget inheritance wondering why the parents widget designer content is removed when adding elements to the child’s designer.

Add a Named Slot to your parent widget This will allow you to at least add components to the child’s widget designer without loosing the parent’s design elements.

The parents elements still do not show in the tree, and can’t be modified via the details panel, but a common base design can have new elements appended to it.