Page 1 of 1

Keeping the position of scroll bar in a list

Posted: Thu Feb 07, 2019 6:59 pm
by sotos
Hello everyone,

I have a browse list. Each row has a button and some other fields. Each time I press the button the specific row is deleted from the list,
the list refreshes and it shows again the 1st element. If I have many rows in the list each time I delete a row I have to scroll back to where I was before
in order to delete the next row and this is very tedious.

Is there any way to keep the scroll bar position after deleting the row?

cheers,
Sotiris

Re: Keeping the position of scroll bar in a list

Posted: Fri Feb 08, 2019 2:48 am
by jyoung
Not sure what you mean by a browse list, but if you are using a PRIM_LIST, you can use the VerticalScrollTo method.

https://docs.lansa.com/14/en/lansa016/p ... rollto.htm

Since you are deleting a row and refreshing the list, you may have to store an index or something so you can get the item close to the row that was deleted and use that entry to for the position.

Hope this helps,
Joe

Re: Keeping the position of scroll bar in a list

Posted: Fri Feb 08, 2019 9:06 pm
by sotos
thanks,

that is exactly what I was looking for.

best,
Sotiris