Provide an alignment parameter for "scroll_to"
Hi!
Currently it is not possible to specify some kind of alignment in the new scroll_to
methods for ListView
and friends. The old scroll_to_cell
method for treeview
had two parameters cell_align
and row_align
which could be specified to determine where the specified cell should become visible.
I'd like to be able to do something similar with ListView
. My use case is a music playlist which automatically scrolls when a new song is playing. With the current behavior the playlist isn't scrolled until the first song which is not visible is played. After that the currently playing song will always be visible but it will be the last one visible on screen. This has the side effect that it is not possible to see which song comes next without manually scrolling the ListView
. With an alignment parameter for scroll_to
I could specify for example 0.5
to have the current song centered allowing for seeing the next few songs without the need for manual scrolling.
I'm pretty sure that this isn't the only use case for such a feature.
In the meantime does anyone know if and how this can be worked around right now?