# How to tell if a scroll box slot widget is in view?

**URL:** <https://forums.unrealengine.com/t/how-to-tell-if-a-scroll-box-slot-widget-is-in-view/484779>\
**Category:** UI\
**Tags:** scrollbox, unreal-engine, Widget, question\
**Created:** [June 11, 2021, 4:18pm UTC](https://forums.unrealengine.com/t/how-to-tell-if-a-scroll-box-slot-widget-is-in-view/484779 "2021-06-11T16:18:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dtb49](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dtb49](https://forums.unrealengine.com/u/Dtb49)\
**Post date:** [June 11, 2021, 4:18pm UTC](https://forums.unrealengine.com/t/how-to-tell-if-a-scroll-box-slot-widget-is-in-view/484779/1 "2021-06-11T16:18:27Z")

</div>

I am trying to implement essentially a button that when pressed will scroll to a certain widget in a scroll box. The issue I am having is trying to figure out if the widget that I have is in view and then making the Scroll Back button appear/disappear when appropriate.

**Is there a way to get the position of a ScrollBox slot widget as a scroll offset of the ScrollBox?** That way I could compare the difference between the current scroll box offset with the scroll offset position of the widget to determine if it is in view.

For example, I would assume the top widget would have a scroll offset position of 0 since it is at the very top. The bottom widget scroll offset position would be the max scroll offset of the scrollbox, etc.

How can I calculate something like this?

---

<div class="post-metadata">

**Author:** ![KonPetTsu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KonPetTsu](https://forums.unrealengine.com/u/KonPetTsu)\
**Post date:** [May 30, 2024, 4:18pm UTC](https://forums.unrealengine.com/t/how-to-tell-if-a-scroll-box-slot-widget-is-in-view/484779/2 "2024-05-30T16:18:26Z")

</div>

For those who are still looking for an answer, just get the height of the widget from the “desired size” node; calculating the height of all children of the scrollbox is also not a problem, as well as finding out the current scroll offset by the scroll event.

---

<div class="post-metadata">

**Author:** ![JornamGregor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JornamGregor](https://forums.unrealengine.com/u/JornamGregor)\
**Post date:** [August 5, 2025, 1:56pm UTC](https://forums.unrealengine.com/t/how-to-tell-if-a-scroll-box-slot-widget-is-in-view/484779/3 "2025-08-05T13:56:18Z")

</div>

You could use the `OnPaint` of the widgets in the scroll box. This is a tick function that’s only called while they’re in view of the scroll box.
