Expose OnClick event to parent widget (button template)

Hi, I want to create a template button I can reuse in multiple windows, but expose the OnClick event to parent widget.

This way my button widget can have special functionality and I dont have to redo this part on each window the button is used.

Hi,
here is the answer I found.

4 Likes

I use Interface messaging in my blueprints so that multiple classes can execute the same function but do it in their own way, so in the caller, you say execute this function on that widget which implements the interface, and let it do whatever it it does. You can treat the interface function as an Event (which is how I do it).

Yes like that :slight_smile:

Simpler way to do the same thing:

339917-problem.png

Parent:

Hope it helps someone :slight_smile:

4 Likes

NIce. I thought there must be a way to just directly set up an event handler for the delegate (aka dispatcher) like that.

Parent:
parent

Parent:

Child: