# Why after hide/unhide UI button, you need to click twice to work?

**URL:** <https://forums.unrealengine.com/t/why-after-hide-unhide-ui-button-you-need-to-click-twice-to-work/338821>\
**Category:** UI\
**Tags:** click, unreal-engine, UI, question\
**Created:** [November 17, 2015, 5:55pm UTC](https://forums.unrealengine.com/t/why-after-hide-unhide-ui-button-you-need-to-click-twice-to-work/338821 "2015-11-17T17:55:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mariyan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mariyan](https://forums.unrealengine.com/u/Mariyan)\
**Post date:** [November 17, 2015, 5:55pm UTC](https://forums.unrealengine.com/t/why-after-hide-unhide-ui-button-you-need-to-click-twice-to-work/338821/1 "2015-11-17T17:55:40Z")

</div>

Hi,  
I have widget with canvas panel in which there is a button.  
After clicking the button i set the visibility to hidden.  
In certain moment it’s visible again, but sometimes nothing happens on first click.  
Please help.

Thanks

---

<div class="post-metadata">

**Author:** ![Mariyan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mariyan](https://forums.unrealengine.com/u/Mariyan)\
**Post date:** [November 19, 2015, 12:27am UTC](https://forums.unrealengine.com/t/why-after-hide-unhide-ui-button-you-need-to-click-twice-to-work/338821/2 "2015-11-19T00:27:01Z")

</div>

Do i have to create more widgets as splitting my main HUD and then Add to Viewport / Remove from Parent separately every widget when needed(in my case just a button for a widget), and then will the buttons work every time?  
Is this the only right way to be done?  
And if so, is hide/unhide method works fine only if you don’t have any activity on the widget, like buttons?

---

<div class="post-metadata">

**Author:** ![Leo-Paul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Leo-Paul](https://forums.unrealengine.com/u/Leo-Paul)\
**Post date:** [December 2, 2017, 9:27pm UTC](https://forums.unrealengine.com/t/why-after-hide-unhide-ui-button-you-need-to-click-twice-to-work/338821/3 "2017-12-02T21:27:59Z")

</div>

Hi I have the same problem did u resolve it ? thx

---

<div class="post-metadata">

**Author:** ![Leo-Paul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Leo-Paul](https://forums.unrealengine.com/u/Leo-Paul)\
**Post date:** [December 2, 2017, 9:33pm UTC](https://forums.unrealengine.com/t/why-after-hide-unhide-ui-button-you-need-to-click-twice-to-work/338821/4 "2017-12-02T21:33:50Z")

</div>

I just replaced " hidden " by " hit test invisible " and it works !!!

---

<div class="post-metadata">

**Author:** ![Mariyan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mariyan](https://forums.unrealengine.com/u/Mariyan)\
**Post date:** [December 2, 2017, 10:39pm UTC](https://forums.unrealengine.com/t/why-after-hide-unhide-ui-button-you-need-to-click-twice-to-work/338821/5 "2017-12-02T22:39:59Z")

</div>

Hi, i ma glad you solved it. In my case i needed to hide the button after you press it, so to work properly, i just use OnClicked Event instead of OnPressed :).

---

<div class="post-metadata">

**Author:** ![Mihai.e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mihai.e](https://forums.unrealengine.com/u/Mihai.e)\
**Post date:** [June 23, 2026, 6:55pm UTC](https://forums.unrealengine.com/t/why-after-hide-unhide-ui-button-you-need-to-click-twice-to-work/338821/6 "2026-06-23T18:55:26Z")

</div>

Just move the UI button out of the screen boundaries, by setting a stupid location on x or y axis. Now the button is “hidden”. When you need to reveal it, just put x=0 and y=0.

@Leo-Paul does this help you?

Node: Set Render Transform

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/b/04b0fb454bfc906f85b74090244814d8f8e69842.png)
