# same size widget drag and drop

**URL:** <https://forums.unrealengine.com/t/same-size-widget-drag-and-drop/460251>\
**Category:** UI\
**Tags:** size, drag-and-drop, unreal-engine, Widget, UE4, Blueprint, question\
**Created:** [January 6, 2020, 2:24pm UTC](https://forums.unrealengine.com/t/same-size-widget-drag-and-drop/460251 "2020-01-06T14:24:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Revelage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Revelage](https://forums.unrealengine.com/u/Revelage)\
**Post date:** [January 6, 2020, 2:24pm UTC](https://forums.unrealengine.com/t/same-size-widget-drag-and-drop/460251/1 "2020-01-06T14:24:04Z")

</div>

![294890-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/d/48d9d8b4ffd5accab14f6dd13e164eaae2263720.png)

when i drag the selected slot outside the inventory it’s not the same size of slot dragged out.  
how can i make the same size?  
how can i take the image from slot selected and assign to slot dragged out ?  
thanks.

---

<div class="post-metadata">

**Author:** ![Dryzzerow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dryzzerow](https://forums.unrealengine.com/u/Dryzzerow)\
**Post date:** [January 9, 2020, 8:31pm UTC](https://forums.unrealengine.com/t/same-size-widget-drag-and-drop/460251/2 "2020-01-09T20:31:05Z")

</div>

I’m just now getting into UMG, which I’m assuming this might be tied to, so my experience is limited. But could it be that the slot you’re dragging it out of has some sort of scaling tied to the image?

Have you set the contents of the slot in the inventory to scale to size, so when dragging it out it snaps back to original size for instance?

---

<div class="post-metadata">

**Author:** ![Revelage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Revelage](https://forums.unrealengine.com/u/Revelage)\
**Post date:** [January 11, 2020, 9:36pm UTC](https://forums.unrealengine.com/t/same-size-widget-drag-and-drop/460251/3 "2020-01-11T21:36:26Z")

</div>

Resolved!

---

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [August 9, 2021, 11:18pm UTC](https://forums.unrealengine.com/t/same-size-widget-drag-and-drop/460251/4 "2021-08-09T23:18:29Z")

</div>

Please, give information of the solved issue for other members.

---

<div class="post-metadata">

**Author:** ![JediKnightChan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jediknightchan/32/1156960_2.png) [@JediKnightChan](https://forums.unrealengine.com/u/JediKnightChan)\
**Post date:** [October 15, 2022, 11:48am UTC](https://forums.unrealengine.com/t/same-size-widget-drag-and-drop/460251/5 "2022-10-15T11:48:08Z")

</div>

While creating drag n drop operation, I got absolute size of widget and normalized it with viewport scale, then I passed this normalized size as new width of newly created widget.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/3/ed3061a0f30e67a7857a15c537f1a7623ba655bc.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/6/4/96499884584fcfa7627d83fd572e120ac0790e03.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/f/a0f32e1cc997942b0caccd595a5cc9004110ebc6.png)

Scaler is a scale box which scales in “fit to x” mode so the final widget has same width as “ScalerSizeBox” width override.

---

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [December 2, 2022, 9:29am UTC](https://forums.unrealengine.com/t/same-size-widget-drag-and-drop/460251/6 "2022-12-02T09:29:01Z")

</div>

Thanks a lot for your reply !

---

<div class="post-metadata">

**Author:** ![BDC\_Patrick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bdc_patrick/32/1104221_2.png) [@BDC\_Patrick](https://forums.unrealengine.com/u/BDC_Patrick)\
**Post date:** [December 2, 2022, 9:41am UTC](https://forums.unrealengine.com/t/same-size-widget-drag-and-drop/460251/7 "2022-12-02T09:41:43Z")

</div>

or… you just add a SizeBox as Root of a the Slot Widgets and the Drag&Drop Widget… same Size… no problem…

---

<div class="post-metadata">

**Author:** ![JediKnightChan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jediknightchan/32/1156960_2.png) [@JediKnightChan](https://forums.unrealengine.com/u/JediKnightChan)\
**Post date:** [December 3, 2022, 1:18pm UTC](https://forums.unrealengine.com/t/same-size-widget-drag-and-drop/460251/8 "2022-12-03T13:18:49Z")

</div>

No. The problem is that size box of non-dnd widget will (most likely) be scaled according to many scaling rules of your UI. That’s why we need to calculate real non-dnd widget size, not abstract one you specify in UMG editor, to set it to dnd widget that has no scaling influences.

---

<div class="post-metadata">

**Author:** ![X-perto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@X-perto](https://forums.unrealengine.com/u/X-perto)\
**Post date:** [October 27, 2024, 10:12pm UTC](https://forums.unrealengine.com/t/same-size-widget-drag-and-drop/460251/9 "2024-10-27T22:12:21Z")

</div>

Thank you!
