# How to highlight Inventory Object by clicking it?

**URL:** <https://forums.unrealengine.com/t/how-to-highlight-inventory-object-by-clicking-it/411122>\
**Category:** UI\
**Tags:** inventory, highlight, unreal-engine, Widget, UE4, Blueprint, question\
**Created:** [December 1, 2017, 5:35pm UTC](https://forums.unrealengine.com/t/how-to-highlight-inventory-object-by-clicking-it/411122 "2017-12-01T17:35:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![serefatilla](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@serefatilla](https://forums.unrealengine.com/u/serefatilla)\
**Post date:** [December 1, 2017, 5:35pm UTC](https://forums.unrealengine.com/t/how-to-highlight-inventory-object-by-clicking-it/411122/1 "2017-12-01T17:35:44Z")

</div>

Hello,

I want to make a highlight around the slot I click in my inventory widget. I can simply put a button under it and change the color but I want it to reset color after clicking another slot. I use a widget bp for slots and multiply them in a slot panel on another widget bp for inventory.

---

<div class="post-metadata">

**Author:** ![Nachtmahr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nachtmahr](https://forums.unrealengine.com/u/Nachtmahr)\
**Post date:** [December 1, 2017, 6:05pm UTC](https://forums.unrealengine.com/t/how-to-highlight-inventory-object-by-clicking-it/411122/2 "2017-12-01T18:05:10Z")

</div>

And what exactly you got trouble with?

OnClick → Reset Highlight on Last Clicked Button (+ isValid Check)-\> Highlight Clicked button → Set Last Clicked Button to the one you clicked.

---

<div class="post-metadata">

**Author:** ![Nachtmahr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nachtmahr](https://forums.unrealengine.com/u/Nachtmahr)\
**Post date:** [December 1, 2017, 6:06pm UTC](https://forums.unrealengine.com/t/how-to-highlight-inventory-object-by-clicking-it/411122/3 "2017-12-01T18:06:07Z")

</div>

Also there are 2 Events you might want to look into. OnFocusRecived and OnFocusLost.

---

<div class="post-metadata">

**Author:** ![serefatilla](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@serefatilla](https://forums.unrealengine.com/u/serefatilla)\
**Post date:** [December 1, 2017, 6:08pm UTC](https://forums.unrealengine.com/t/how-to-highlight-inventory-object-by-clicking-it/411122/4 "2017-12-01T18:08:38Z")

</div>

Thanks. I will try those events.

---

<div class="post-metadata">

**Author:** ![serefatilla](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@serefatilla](https://forums.unrealengine.com/u/serefatilla)\
**Post date:** [December 1, 2017, 6:47pm UTC](https://forums.unrealengine.com/t/how-to-highlight-inventory-object-by-clicking-it/411122/5 "2017-12-01T18:47:02Z")

</div>

The problem is I am trying to change color from Slot Widget BP. I create an event on click and change the color of the button from transparent to a shiny orange. But after I click another slot I don’t have access to highlighted one to make it transparent again.

---

<div class="post-metadata">

**Author:** ![Nachtmahr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nachtmahr](https://forums.unrealengine.com/u/Nachtmahr)\
**Post date:** [December 1, 2017, 6:52pm UTC](https://forums.unrealengine.com/t/how-to-highlight-inventory-object-by-clicking-it/411122/6 "2017-12-01T18:52:18Z")

</div>

Yes thats why I told you to store the last Clicked one 😜 or play around with the Focus events.
