# First visible listbox row after scrolling

**URL:** <https://forum.xojo.com/t/first-visible-listbox-row-after-scrolling/43221>\
**Category:** General\
**Created:** [April 27, 2018, 4:07pm UTC](https://forum.xojo.com/t/first-visible-listbox-row-after-scrolling/43221 "2018-04-27T16:07:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johann\_Kienbrandt](https://forum.xojo.com/user_avatar/forum.xojo.com/johann_kienbrandt/32/2528_2.png) [@Johann\_Kienbrandt](https://forum.xojo.com/u/Johann_Kienbrandt)\
**Post date:** [April 27, 2018, 4:07pm UTC](https://forum.xojo.com/t/first-visible-listbox-row-after-scrolling/43221/1 "2018-04-27T16:07:54Z")

</div>

How can I find out after scrolling a listbox (forwards or backwards), which is the first visible row.

---

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [April 27, 2018, 4:24pm UTC](https://forum.xojo.com/t/first-visible-listbox-row-after-scrolling/43221/2 "2018-04-27T16:24:04Z")

</div>

[http://documentation.xojo.com/index.php/ListBox.RowFromXY](http://documentation.xojo.com/index.php/ListBox.RowFromXY)

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [April 27, 2018, 4:25pm UTC](https://forum.xojo.com/t/first-visible-listbox-row-after-scrolling/43221/3 "2018-04-27T16:25:05Z")

</div>

[http://documentation.xojo.com/index.php/ListBox.RowFromXY](http://documentation.xojo.com/index.php/ListBox.RowFromXY)

Pass the Listbox Left +Top values.

 Beatrix beats me on this one !

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [April 27, 2018, 4:25pm UTC](https://forum.xojo.com/t/first-visible-listbox-row-after-scrolling/43221/4 "2018-04-27T16:25:56Z")

</div>

or perhaps

> [@](#):
>
> ListBox.ScrollPosition  
> Property (As Integer)  
> aListBox.ScrollPosition = newIntegerValue  
> or  
> IntegerValue = aListBox.ScrollPosition  
> Zero-based index of the top visible row in the ListBox.
> 
> Read ScrollPosition to determine the top visible row; write to ScrollPosition to scroll the ListBox. When the scrollbar thumb is scrolled to the bottom, ScrollPosition cannot be incremented any further.

---

<div class="post-metadata">

**Author:** ![Johann\_Kienbrandt](https://forum.xojo.com/user_avatar/forum.xojo.com/johann_kienbrandt/32/2528_2.png) [@Johann\_Kienbrandt](https://forum.xojo.com/u/Johann_Kienbrandt)\
**Post date:** [April 27, 2018, 4:35pm UTC](https://forum.xojo.com/t/first-visible-listbox-row-after-scrolling/43221/5 "2018-04-27T16:35:10Z")

</div>

I’m not clicking on a listbox row, I’m using the scrollbar, therefore I can’t use Listbox.RowFromXY.  
I think Dave is on the right track, I will give that a go,

thanks Dave, Beatriz and Emil for your help

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [April 27, 2018, 5:29pm UTC](https://forum.xojo.com/t/first-visible-listbox-row-after-scrolling/43221/6 "2018-04-27T17:29:19Z")

</div>

> [@385141:@Emile Schwarz](#):
>
> Pass the Listbox Left +Top values.

Did you read the line above ?

I was telling you to remove the Mouse values with Listbox left + something / Listbox top + something.

I am sure Beatrix better understand your question than me.

Now if you are happy with Dave answer, it is ok for me too.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:11pm UTC](https://forum.xojo.com/t/first-visible-listbox-row-after-scrolling/43221/7 "2020-10-29T19:11:49Z")

</div>


