Is there any way to programatically scroll a list? Say if I had two lists but if you scrolled one I wanted the other one to stay in sync? It looks like List.offset records the scroll amount, but of course a user can't read it or write to it, and that's probably not the interface you'd want anyway. (Just curious; I don't have a real use-case for this at the moment.)

Is there any way to programatically scroll a
list? Say if I had two lists but if you scrolled one I wanted the other
one to stay in sync? It looks like List.offset records the scroll
amount, but of course a user can't read it or write to it, and that's
probably not the interface you'd want anyway. (Just curious; I don't
have a real use-case for this at the moment.)

There isn't yet a way to access the scroll offset. It's definitely a
useful feature, but just like you I haven't had a use for it yet.

One complication is that the offset field is not absolute, but rather
relative to the first visible element to avoid traversing the entire
underlying list at every layout.

I think, for me, it'd be sufficient to be able to a) get the index of the top item on the list, and b) set that index as the top item of the same list, at a later time. Basically I display a list, scroll it, display another list, go back to the previous list, and I'd like to display it at the same spot it was before.

... As I wrote that I realized I could conceivably just display a new list on top of the old one, or create a new list object, display it, and then swap the old one back in again.

So I'll give that a shot.

That said, this approach will not apply to every situation (and might not work for me!), so being able to programmatically move or scroll a list will still come in handy eventually.