# How would I go about making a movable widget?

**URL:** <https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668>\
**Category:** UI\
**Tags:** movable, unreal-engine, Widget, Blueprint, question\
**Created:** [October 19, 2014, 11:37pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668 "2014-10-19T23:37:20Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![TM317](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TM317](https://forums.unrealengine.com/u/TM317)\
**Post date:** [October 19, 2014, 11:37pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/1 "2014-10-19T23:37:20Z")

</div>

How would I go about making a movable widget with either with BP or C++?

I tried to find a way to make my widget movable but I didn’t see an easy way.  
Maybe I’m missing something.

Any ideas?

---

<div class="post-metadata">

**Author:** ![bigzer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bigzer](https://forums.unrealengine.com/u/bigzer)\
**Post date:** [November 6, 2014, 1:08pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/2 "2014-11-06T13:08:27Z")

</div>

I’m also interested to know, did you find a solution?

---

<div class="post-metadata">

**Author:** ![Whitehawk\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Whitehawk\_1](https://forums.unrealengine.com/u/Whitehawk_1)\
**Post date:** [November 6, 2014, 4:41pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/3 "2014-11-06T16:41:17Z")

</div>

I think we’d like a little more information to help. Do you mean a sliding window? Or do you want it to rotate on a corner axis? Have you tried some basic matinee stuff such as this?

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/e/e/feecb5c5d3bf1a2d36308c4352483835600b2390.jpeg "How to make a normal door in Unreal 4 Very Easy") ](https://www.youtube.com/watch?v=PJ7VbGhMDMo)

---

<div class="post-metadata">

**Author:** ![TM317](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TM317](https://forums.unrealengine.com/u/TM317)\
**Post date:** [November 6, 2014, 4:46pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/4 "2014-11-06T16:46:04Z")

</div>

This is my fault for not being very clear.

By window I meant widget.  
To be able to create movable HUD/UI elements.

I am not sure if bigzer meant the same kind of “Window”.

---

<div class="post-metadata">

**Author:** ![Whitehawk\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Whitehawk\_1](https://forums.unrealengine.com/u/Whitehawk_1)\
**Post date:** [November 6, 2014, 4:49pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/5 "2014-11-06T16:49:03Z")

</div>

oooh okay. Sorry I don’t know. You might want to repost your question with better wording and delete this one. 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [November 11, 2014, 5:47pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/6 "2014-11-11T17:47:35Z")

</div>

Hello,

I have an example of a widget that can be dragged around the screen as along as the mouse button is held down on it. I have included my blueprints via a notepad file. You can simply copy and paste them into their respective blueprints. This will give a good starting point. [MyCharacter\_BP][1] and [YourWidget\_BP][2] I hope this helps.

My Character blueprint:

 ![20788-draghelp1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713770f14120adbfb4a36c1653a8be4ff62a6dae.png)

My Widget:

![20791-draghelp2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/8/2/982d900ae302bcff07932221358f30f3f9eda9a0.png)

Make it a great day

---

<div class="post-metadata">

**Author:** ![TM317](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TM317](https://forums.unrealengine.com/u/TM317)\
**Post date:** [November 17, 2014, 6:13pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/7 "2014-11-17T18:13:05Z")

</div>

Rudy,

Thanks for getting back to me.  
I have tried using your method but I can not seem to get it to work.  
One thing to note is that I am using a top down(click to move) project.

But I have also tried in an empty project, and although the throbber does jump around it does not stay attached when “dragging”.

Here is the project I created:  
[https://www.dropbox.com/s/jkfgt4h3nb9gxvr/MyProject.rar?dl=0](https://www.dropbox.com/s/jkfgt4h3nb9gxvr/MyProject.rar?dl=0)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [November 17, 2014, 6:45pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/8 "2014-11-17T18:45:02Z")

</div>

Hello,

One quick question before we jump into things. When you are testing on the workaround are you doing it in the editor window or a standalone? When I tested this workaround, I did so in a standalone window. This may make a difference.

---

<div class="post-metadata">

**Author:** ![TM317](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TM317](https://forums.unrealengine.com/u/TM317)\
**Post date:** [November 17, 2014, 7:02pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/9 "2014-11-17T19:02:50Z")

</div>

A new editor window.  
But I would need it to work windowed or full screen.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [November 17, 2014, 10:04pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/10 "2014-11-17T22:04:24Z")

</div>

Hello,

Make sure that you have your anchor is the upper left corner for your widget. I have also made a slight change that will help center the widget on the mouse when dragging. This may help. Also I noticed that the project you provided wasn’t working due to there being no character in the level. Let me know if any of this information helps.

The slight change was:

 ![21462-draghelp3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/d/7/4d7b9f428ace7c9c091c806c6ae66a80f091f14b.png)

---

<div class="post-metadata">

**Author:** ![TM317](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TM317](https://forums.unrealengine.com/u/TM317)\
**Post date:** [November 18, 2014, 5:10pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/11 "2014-11-18T17:10:15Z")

</div>

Thanks again for all your help.  
It works as long as the window is smaller than my desktop resolution and the window is not resized.  
But if I set it to my desktop resolution the widget is offset to the left.

You can see what I mean by a similar post I made with screenshots:

> **[Setting position of widget to mouse position](https://forums.unrealengine.com/questions/133804/setting-position-of-widget-to-mouse-position.html)**
>
> Maybe because your “-120” doesn’t fit all resolutions. What is this number based of? Could you maybe calculate it so that it changed from resolution to resolution?

Is there a way to disable resizing of windows?  
Also is there a way to play fullscreen?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [November 18, 2014, 5:22pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/12 "2014-11-18T17:22:04Z")

</div>

Hello ,

I have went back and looked through my blueprints. I have corrected the offset error by setting the anchor instead of the position of the widget. After testing it appears to maintain it’s accuracy through all window sizes and changes. If there are any more errors with my blueprints please let me know. I hope this update helps.

**NOTE:** The node name covered by the tool tip is the **SET POSITION** node for the widget. It just needs to be set to 0,0.

 ![21532-draghelp4.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/5/c45484a0e81944791c4fd23f633e39ae93444e5a.png)

Make it a great day

---

<div class="post-metadata">

**Author:** ![TM317](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TM317](https://forums.unrealengine.com/u/TM317)\
**Post date:** [November 18, 2014, 5:38pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/13 "2014-11-18T17:38:23Z")

</div>

Ok that seems to do it.  
Thanks for the help!

---

<div class="post-metadata">

**Author:** ![Shrooblord](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shrooblord/32/88712_2.png) [@Shrooblord](https://forums.unrealengine.com/u/Shrooblord)\
**Post date:** [September 16, 2015, 2:15pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/14 "2015-09-16T14:15:39Z")

</div>

I’ve been experimenting with this in UE 4.9. It seems that the ‘Slot as Canvas Slot’ behaviour has changed. Widgets created through blueprints don’t get added on a Canvas Panel. Only Widgets that were defined as being on a Canvas to begin with allow interaction through Slot as Canvas.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [September 16, 2015, 2:33pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/15 "2015-09-16T14:33:36Z")

</div>

Hello Shrooblord,

Thank you for sharing your information. Please keep in mind that this example was made for an older version of the engine and may no longer be an effective method. Please feel free to share your solutions for the more recent versions of the engine.

Make it a great day

---

<div class="post-metadata">

**Author:** ![KhalimWu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KhalimWu](https://forums.unrealengine.com/u/KhalimWu)\
**Post date:** [May 17, 2016, 10:31pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/16 "2016-05-17T22:31:56Z")

</div>

This solution worked perfect for me. Thanks for sharing

---

<div class="post-metadata">

**Author:** ![needforgrib](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@needforgrib](https://forums.unrealengine.com/u/needforgrib)\
**Post date:** [March 13, 2019, 9:21pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-movable-widget/296668/17 "2019-03-13T21:21:46Z")

</div>

this post resolve all my problems, just use “get viewport scale”

[https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/22260-umg-mouse-screen-position-problem?p=262344#post262344](https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/22260-umg-mouse-screen-position-problem?p=262344#post262344)
