# Hide Mouse - Widget Confusion

**URL:** <https://forums.unrealengine.com/t/hide-mouse-widget-confusion/428952>\
**Category:** UI\
**Tags:** unreal-engine, UI, Widget, UE4, Blueprint, question\
**Created:** [July 8, 2018, 4:18pm UTC](https://forums.unrealengine.com/t/hide-mouse-widget-confusion/428952 "2018-07-08T16:18:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c6f6da1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c6f6da1](https://forums.unrealengine.com/u/anonymous_user_1c6f6da1)\
**Post date:** [July 8, 2018, 4:18pm UTC](https://forums.unrealengine.com/t/hide-mouse-widget-confusion/428952/1 "2018-07-08T16:18:53Z")

</div>

![246625-example-image.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/b/1/db1930515152a0f68342faae4135db23855416b8.png)

Ok this is a basic example of the major problem I’m facing. I have absolutely no idea why this Widget Blueprint doesn’t run as intended. I’m almost considering it’s not my fault.

The example above fails to hide the mouse after “Hide Mouse” is printed.

Does anyone else get a different result when replicating?

Thanks for the help in advance, much appreciated.

---

<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 8, 2018, 5:00pm UTC](https://forums.unrealengine.com/t/hide-mouse-widget-confusion/428952/2 "2018-07-08T17:00:17Z")

</div>

I don’t blame you.

You’ve got 2 things affecting your cursor visibility. A UMG widget and the Player Controller. Even though you asked the controller to hide it, the widget that the cursor is currently over is overriding cursor visibility.

You can test it by executing the code you posted and clicking anywhere outside of the _Visible_ parts of the widget, this will pass the control over the the PC and the cursor should disappear.

In order to hide the cursor for good, even while a widget is in focus, you’d need to ask the widget to do it, too. In this example, the PC is showing the cursor, the border was set to _None_, and the button was left untouched:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/a/48afabc34956862ab095289647c4694c1b790368.gif)](https://gyazo.com/d421ecf46a53551e013cd30641a62d09)

You can do it manually for any widget element in this hidden panel:

![246620-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/6/5/0657c8a33a79d000e157fe29e237c5101dd99b15.png)

Or dynamically, like so:

 ![246631-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/0/460e08301205a95348cbdceaedb223e08bc38200.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c6f6da1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c6f6da1](https://forums.unrealengine.com/u/anonymous_user_1c6f6da1)\
**Post date:** [July 8, 2018, 5:09pm UTC](https://forums.unrealengine.com/t/hide-mouse-widget-confusion/428952/3 "2018-07-08T17:09:25Z")

</div>

Wow, absolutely incredible!

Thank you Everynone for such a quick explanation of what is really going on and also a detailed solution.

I’ve really learnt something. I hope this thread helps other new people as well.

**10/10**

---

<div class="post-metadata">

**Author:** ![eobet](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eobet/32/465239_2.png) [@eobet](https://forums.unrealengine.com/u/eobet)\
**Post date:** [March 14, 2020, 4:03pm UTC](https://forums.unrealengine.com/t/hide-mouse-widget-confusion/428952/4 "2020-03-14T16:03:51Z")

</div>

I could not get this to work in 4.24, even if I add the stupid thing in tick. ☹

EDIT: Apparently a full screen HUD doesn’t count as a widget, and thus doesn’t show the cursor… wtf!?

---

<div class="post-metadata">

**Author:** ![Wontague](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wontague/32/1008648_2.png) [@Wontague](https://forums.unrealengine.com/u/Wontague)\
**Post date:** [July 9, 2021, 7:29am UTC](https://forums.unrealengine.com/t/hide-mouse-widget-confusion/428952/5 "2021-07-09T07:29:06Z")

</div>

If this isn’t working, you may need to first use the node from:

PlayerController \> SetInputModeGameOnly / SetInputModeUIOnly, etc.

The Input Mode seemed to override any manual cursor settings in my project.

---

<div class="post-metadata">

**Author:** ![Zordoron\_RezXG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zordoron\_RezXG](https://forums.unrealengine.com/u/Zordoron_RezXG)\
**Post date:** [August 26, 2023, 1:49pm UTC](https://forums.unrealengine.com/t/hide-mouse-widget-confusion/428952/6 "2023-08-26T13:49:14Z")

</div>

Hey guys, This one worked for me! I hope someone finds this useful. (this is inside my widget bp)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/4/6444e9be7a4e225c691415374477d76e869556f5.png)

---

<div class="post-metadata">

**Author:** ![mikedolan03](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mikedolan03](https://forums.unrealengine.com/u/mikedolan03)\
**Post date:** [May 19, 2024, 10:31pm UTC](https://forums.unrealengine.com/t/hide-mouse-widget-confusion/428952/7 "2024-05-19T22:31:46Z")

</div>

I found that with a custom widget cursor I could not get the mouse to hide after detecting game pad input unless I moved the mouse. So when I set the mouse cursor to hidden I adjust the mouse position and then the mouse picks up the hidden attribute.

 ![hidemouse](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/6/286a64c5853f7b87eb4f363bcc124ed2f0c20ead.png)
