I got it to work by calculating the bottom item and using EnsureVisible
on the one above it since EnsureVisible
always shows an extra item underneath the targeted one if there is any.
Works perfectly and no need for GetScrollPos
since I'm pretty sure there is no SetScrollPos
.
list_total = list.GetItemCount()
list_top = list.GetTopItem()
list_pp = list.GetCountPerPage()
list_bottom = min(list_top + list_pp, list_total - 1)
list.EnsureVisible((list_bottom - 1))