# How to access a custom widget which is inside of another custom widget

**URL:** <https://forums.unrealengine.com/t/how-to-access-a-custom-widget-which-is-inside-of-another-custom-widget/492148>\
**Category:** UI\
**Tags:** unreal-engine, UE4, question, UE4-27\
**Created:** [January 28, 2022, 10:53am UTC](https://forums.unrealengine.com/t/how-to-access-a-custom-widget-which-is-inside-of-another-custom-widget/492148 "2022-01-28T10:53:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![LikeApro77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LikeApro77](https://forums.unrealengine.com/u/LikeApro77)\
**Post date:** [January 28, 2022, 10:53am UTC](https://forums.unrealengine.com/t/how-to-access-a-custom-widget-which-is-inside-of-another-custom-widget/492148/1 "2022-01-28T10:53:42Z")

</div>

I am trying to do drag and drop from the widget where is the weapon icon to inventory which is in the left side, by the main widget blueprint how can I know which blueprint is clicked, dragged and dropped?

 ![커스텀위젯](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/4/8247aecc14b607684a805783bf994e9529ea8306.jpeg)

---

<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:** [January 28, 2022, 4:49pm UTC](https://forums.unrealengine.com/t/how-to-access-a-custom-widget-which-is-inside-of-another-custom-widget/492148/2 "2022-01-28T16:49:51Z")

</div>

> [@LikeApro77](#):
>
> how can I know which blueprint is clicked, dragged and dropped?

The dragged blueprint Detects Drag and creates a Drag Operation where you specify the `Payload` - the widget you’re dragging.

The widget where you deliver the drag overrides onDrop, where you can use the `Payload` pin to get to the widget you dragged here.

* * *

An example:

> [@How do I implement a drag and drop in a widget?](https://forums.unrealengine.com/t/how-do-i-implement-a-drag-and-drop-in-a-widget/272093/6):
>
> If you’re doing the whole thing for the very 1st time, I’d suggest following a tutorial (even though it may not be 100% what you need - just to get an idea of the logic behind it) as what I’ve posted may not contain every detail needed. How about the part where the objects can be dragged and dropped? As a kickstarter, consider the following: this would go into the widget that we’ll be dragging around - called wRubbish here the override dropdown is full of useful functionality here we’re de…

And a bunch of tutorials that cover this extensively:

[https://www.youtube.com/results?search\_query=ue4+drag+drop](https://www.youtube.com/results?search_query=ue4+drag+drop)

* * *

If you have a specific question, do tell!

---

<div class="post-metadata">

**Author:** ![LikeApro77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LikeApro77](https://forums.unrealengine.com/u/LikeApro77)\
**Post date:** [January 29, 2022, 3:33am UTC](https://forums.unrealengine.com/t/how-to-access-a-custom-widget-which-is-inside-of-another-custom-widget/492148/3 "2022-01-29T03:33:41Z")

</div>

Thanks for your reply the problem that I am facing is that when I have four custom widgets which three of them is inside of the main one so I will call the four custom widgets main,1,2 and 3, what I want to do is make click event from widget 3 and to drop it into widget 1 but drop event only recognizes only inside the 3, so basically clicking an image icon from widget 3 makes a widget to drop that it will be dropped in the 1.

---

<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:** [January 29, 2022, 6:53am UTC](https://forums.unrealengine.com/t/how-to-access-a-custom-widget-which-is-inside-of-another-custom-widget/492148/4 "2022-01-29T06:53:36Z")

</div>

> [@LikeApro77](#):
>
> which blueprint is clicked, dragged and dropped?

So no dragging operation is involved at all, it’s just about clicking?

* * *

Lets see if I got it right:

- this is my `wMain`, it has 2 other user widgets inside:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/6/d/36d55187a9ff4cbbad7bc22e079ef2ab9c12e159.png)

- if the goal is to click on the `wClickMe` and move it to the drop zone, I’d call a dispatcher in the `wClickMe`:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/c/a6cfd878a47447222a6d936bca222bd408c1ded3.png)

- I’d have an event in the `wDropZone`

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/6/256fbda4d9e48589674df492048ec22e1296a99c.png)

- and have the main widget bind both widgets:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/f/0/ff05858d43f6a3a4caedcd580cb20964c8f20341.png)

* * *

However, judging by the original image:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/5/e95255d1dcdf23207368be9ded15afea95112c52.jpeg)

It seems that we have slots that will have some content and, once clicked, a slot should move its content to the inventory list? Or are we moving an entire slot? How close am I?

---

<div class="post-metadata">

**Author:** ![LikeApro77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LikeApro77](https://forums.unrealengine.com/u/LikeApro77)\
**Post date:** [January 29, 2022, 8:42am UTC](https://forums.unrealengine.com/t/how-to-access-a-custom-widget-which-is-inside-of-another-custom-widget/492148/5 "2022-01-29T08:42:19Z")

</div>

Sorry for my bad explanation, from Widget 3 you will drag and drop it onto Widget 1, when you drag it the slot image would be like this one, and it will be the Widget that is added onto the ListView from Widget 1

 ![커스텀위젯](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/5/b453bc59dc3b68cc36ab3b548e2a343853370eab.jpeg)

---

<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:** [January 29, 2022, 8:50am UTC](https://forums.unrealengine.com/t/how-to-access-a-custom-widget-which-is-inside-of-another-custom-widget/492148/6 "2022-01-29T08:50:24Z")

</div>

But isn’t this a standard drag & drop I suggested in my very first post?

> Widget 3 you will drag and drop it onto Widget 1

`DetectDrag` + `Create OP` in 3 and `onDrop` in 1.

Why wouldn’t it work? What am I missing? My understanding is that we’re simply reparenting one widget from a container to another container using drag & drop.

---

<div class="post-metadata">

**Author:** ![LikeApro77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LikeApro77](https://forums.unrealengine.com/u/LikeApro77)\
**Post date:** [January 29, 2022, 10:13am UTC](https://forums.unrealengine.com/t/how-to-access-a-custom-widget-which-is-inside-of-another-custom-widget/492148/7 "2022-01-29T10:13:51Z")

</div>

Thanks! That did the trick.
