# How can i manually set a button widget to hovered state

**URL:** <https://forums.unrealengine.com/t/how-can-i-manually-set-a-button-widget-to-hovered-state/373567>\
**Category:** UI\
**Tags:** button, hover, unreal-engine, Widget, mouse-position, question, UMG\
**Created:** [October 17, 2016, 11:20am UTC](https://forums.unrealengine.com/t/how-can-i-manually-set-a-button-widget-to-hovered-state/373567 "2016-10-17T11:20:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ViceVersa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ViceVersa](https://forums.unrealengine.com/u/ViceVersa)\
**Post date:** [October 17, 2016, 11:20am UTC](https://forums.unrealengine.com/t/how-can-i-manually-set-a-button-widget-to-hovered-state/373567/1 "2016-10-17T11:20:11Z")

</div>

I noticed that they have events for when the widget is pressed or clicked, but not for hovered. I want to be able to change the buttons color whent he widget is being hovered (which works fine for mouse). but i want to be able to do this for a gamepad as well. I found a function that Checks if it is hovered, but not to set the value.

---

<div class="post-metadata">

**Author:** ![Amalgamator](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Amalgamator](https://forums.unrealengine.com/u/Amalgamator)\
**Post date:** [February 6, 2017, 6:14pm UTC](https://forums.unrealengine.com/t/how-can-i-manually-set-a-button-widget-to-hovered-state/373567/2 "2017-02-06T18:14:35Z")

</div>

This is probs a bit late but for any one also looking for this as I was. I’ve just figured out how to do it, you have to get the button you’re trying to manipulate, get its current stytel and feed it to the set method. Just swap the normal and hovered state around. So normal set in set method is equal to hovered state in get method.

---

<div class="post-metadata">

**Author:** ![Andypants](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andypants](https://forums.unrealengine.com/u/Andypants)\
**Post date:** [January 25, 2018, 1:01pm UTC](https://forums.unrealengine.com/t/how-can-i-manually-set-a-button-widget-to-hovered-state/373567/3 "2018-01-25T13:01:41Z")

</div>

Please please elaborate…I’ve been searching for ages and it seems like you have the answer…if you can, please post a picture of your blueprint

---

<div class="post-metadata">

**Author:** ![KindredGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KindredGames](https://forums.unrealengine.com/u/KindredGames)\
**Post date:** [February 9, 2018, 6:17am UTC](https://forums.unrealengine.com/t/how-can-i-manually-set-a-button-widget-to-hovered-state/373567/4 "2018-02-09T06:17:43Z")

</div>

This is how I did it. This is on the event constructed/begin play. I’m grabbing the default button and setting it’s style as my “DefaultButton” style, then splitting the out pin into a struct, and creating a second button style called “HoverButton” which I’m then feeding the “hovered” style portion from the default button style into the default portion on the new button style. This is giving me two style variables I can easily plug in whenever I need to swap the styles out.

Hope that helped! Thanks to Angel1630 for giving me the original idea. Worked perfect!

![230027-ue4editor-2018-02-08-23-14-17.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/3/b/63bdbbad20d2d05c80c9637e8de4feffadb900db.png)

---

<div class="post-metadata">

**Author:** ![NPCDestroyer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NPCDestroyer](https://forums.unrealengine.com/u/NPCDestroyer)\
**Post date:** [May 28, 2022, 9:25pm UTC](https://forums.unrealengine.com/t/how-can-i-manually-set-a-button-widget-to-hovered-state/373567/5 "2022-05-28T21:25:04Z")

</div>

I attempted it this way but it did not work the way I intended, i believe this has something to do with a prior tutorial I went through in regards to using keyboard focus and switching the style of buttons, anyway this is what i was going for

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/b/d5bee38052ec10bcb568082c5d1a2b65ae8ef163.png)

---

<div class="post-metadata">

**Author:** ![FunGames55](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fungames55/32/710746_2.png) [@FunGames55](https://forums.unrealengine.com/u/FunGames55)\
**Post date:** [November 8, 2022, 1:18am UTC](https://forums.unrealengine.com/t/how-can-i-manually-set-a-button-widget-to-hovered-state/373567/6 "2022-11-08T01:18:56Z")

</div>

None of the solutions using style worked for me. I couldn’t get the changes to reflect on the buttons. What I ended up doing was setting all the button state tints to `White` and then just changing the color using `SetBackgroundColor`. I unified the mouse and game pad code by overriding the `OnHovered` and `OnPressed` events for the buttons and changing the color there in the same manner as with the gamepad path. I noticed that all of these applied a “tint” to the button which made me think color component multiplication so setting every other value to white and then just setting the background color had the desired effect.

---

<div class="post-metadata">

**Author:** ![Yaeko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yaeko](https://forums.unrealengine.com/u/Yaeko)\
**Post date:** [March 25, 2025, 1:31pm UTC](https://forums.unrealengine.com/t/how-can-i-manually-set-a-button-widget-to-hovered-state/373567/7 "2025-03-25T13:31:16Z")

</div>

I know that this is an old topic, but given how hard it is to come by functioning stuff regarding those things, I would like to add a more dynamic solution.

This one works regardless of your button style (e.g. you have different styled buttons in your menu).

Its only the bare foundation though:

 ![Unbenannt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/1/4a1c1894a9c37cde9d2d82a1b73561b494f1c9fb.jpeg)

Notes:

- ForEachLoopWithBreak is just a thing I do, to stop cycling an array where I already found the one button that can be highlighted, its not needed and just optimization stuff. (currently unplugged)

- “Is In Viewport” is an option (But I would recommend using an Event or tie this into your setup for showing the widgets) to only run this when its in viewport, which will be good for performance if you have a lot of buttons etc.

- you can easily turn this into an actual function, and even use one for all your widgets, instead of putting one inside each of your widgets. (since I assume that many here have more than one widget for their menu.)

=================

PS: yes, I am aware that there is some fancy new work in progress keybinding etc. thingy in UE5 (that can be used to also do this), but I dont touch things that have “experimental” next to it, which parts of it have in 5.3… therefore I am still running my almost 10 years old keybinding solution/setup now. (if it works, it works, eh?)

PS2: you can probably get away without the “is valid”, but I dont like getting “None” messages in log.

---

<div class="post-metadata">

**Author:** ![Hedda\_Kalvo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hedda\_Kalvo](https://forums.unrealengine.com/u/Hedda_Kalvo)\
**Post date:** [March 18, 2026, 6:21pm UTC](https://forums.unrealengine.com/t/how-can-i-manually-set-a-button-widget-to-hovered-state/373567/8 "2026-03-18T18:21:54Z")

</div>

**Set “Manual Redraw” to false and it will work!**

You can find this under the Widget component in your blueprint, under the “User Interface” category 🙂

It’ll redraw (update) regularly, but you can define how often using “Redraw Time”

 ![Screenshot 2026-03-18 180213](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/e/e/3eed3cc4f59328f20f544cc02024367a3ed4ba66.png)
