# How to override the on clicked event in derived widget bp?

**URL:** <https://forums.unrealengine.com/t/how-to-override-the-on-clicked-event-in-derived-widget-bp/485761>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [July 5, 2021, 3:45am UTC](https://forums.unrealengine.com/t/how-to-override-the-on-clicked-event-in-derived-widget-bp/485761 "2021-07-05T03:45:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwhhy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bwhhy](https://forums.unrealengine.com/u/bwhhy)\
**Post date:** [July 5, 2021, 3:45am UTC](https://forums.unrealengine.com/t/how-to-override-the-on-clicked-event-in-derived-widget-bp/485761/1 "2021-07-05T03:45:05Z")

</div>

Hi,

I have a user widget A that has a button with on clicked event. Then I created a blueprint B based on A and **wish to override the execution steps** triggered by the on clicked event. However, it always use the A version and none of the steps in B are executed.

Event graph of A:

 ![343245-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/0/b1004eef2984f965709fdc6bb246eaf937abe511.png)

Event graph of B:

 ![343246-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/8/878485957bb3f900ae267e5edc6bb06c70bc41ec.png)

Where goes wrong?

Is overriding the event execution correct way? Are there better practice to achieve my intention?

Thanks for your time!

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 5, 2021, 8:25am UTC](https://forums.unrealengine.com/t/how-to-override-the-on-clicked-event-in-derived-widget-bp/485761/2 "2021-07-05T08:25:47Z")

</div>

> Then I created a blueprint B based on  
> A

How did you do that? Did you reparent the widget?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 5, 2021, 8:32am UTC](https://forums.unrealengine.com/t/how-to-override-the-on-clicked-event-in-derived-widget-bp/485761/3 "2021-07-05T08:32:17Z")

</div>

- Widget A:

 ![343277-screenshot-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/0/5/e0510e5d408396d97f7e0e3dc0f95fa713bffc19.png)

- Widget B, reparented to A:

 ![343278-screenshot-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/5/30518bd74815180885629b27cc6d7b8c1bcb8ce3.png)

- B’s hierarchy is empty
- added B to viewport and it prints B

---

<div class="post-metadata">

**Author:** ![bwhhy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bwhhy](https://forums.unrealengine.com/u/bwhhy)\
**Post date:** [July 6, 2021, 6:34am UTC](https://forums.unrealengine.com/t/how-to-override-the-on-clicked-event-in-derived-widget-bp/485761/4 "2021-07-06T06:34:41Z")

</div>

Thanks for your reply!  
I created a new widget B and manually reparent it to A and it worked.  
But do you know why the widget created using “right click-\>create new blueprint-\>pick parent class-\>choose A” not working? I checked all the settings I can find of the widget B created by these two methods, everything is same.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 6, 2021, 6:58am UTC](https://forums.unrealengine.com/t/how-to-override-the-on-clicked-event-in-derived-widget-bp/485761/5 "2021-07-06T06:58:52Z")

</div>

![343362-screenshot-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/6/7c60f5481b66d5d73eb8ef7d412022c044b003b9.png)

If you mean this, then this works OK on my end, too. My B widget can do this after having its parent class picked as A, overriding A’s event:

 ![343363-screenshot-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/3/5/335571ff0b9ed5c29d641bf10749ad24c869bb1f.png)

I’m on 4.25, though.

---

<div class="post-metadata">

**Author:** ![bwhhy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bwhhy](https://forums.unrealengine.com/u/bwhhy)\
**Post date:** [July 6, 2021, 7:47am UTC](https://forums.unrealengine.com/t/how-to-override-the-on-clicked-event-in-derived-widget-bp/485761/6 "2021-07-06T07:47:17Z")

</div>

Tried on 4.24 and all worked. Not working on 4.26.2, should be a bug.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 6, 2021, 8:25am UTC](https://forums.unrealengine.com/t/how-to-override-the-on-clicked-event-in-derived-widget-bp/485761/7 "2021-07-06T08:25:16Z")

</div>

Nasty. Gonna skip right to 4.27 then as this would undo my entire interface. Thanks for tracking it down!
