Closed medhefgo closed 1 year ago
Indeed. I suppose we need to do something like we do in TextEdit
when the cursor position changes. But where we know the cursor y coordinate from the native code, while here we'd need to get it out of a repeater's item.
I wonder if creative minds @ogoffart and @FloVanGH have any idea how to do this in a clever way? :)
Yeah, that's not trivial to implement.
I guess one way would be to add a function ensure-visible(row)
to the ListView, that would be lowered to native code .
Without that, it could be implemented for ListView that have constant item height by playing with the content-y
in the keyboard binding
I guess one way would be to add a function
ensure-visible(row)
to the ListView, that would be lowered to native code .
Make that Flickable
, please.
Without that, it could be implemented for ListView that have constant item height by playing with the content-y in the keyboard binding
I did that. It's feasible, but obviously doesn't work when you have a flickable with different item heights. It would be really nice if one could create properties that can bind to components. Then this would be far simpler to accomplish:
@ogoffart @tronical I have implement that feature for the auto completion on my tiling desktop project. I could check it next week.
Items inside of a StandardListView can be selected by keyboard arrow keys, but doing so will not scroll if the newly selected item is outside the current viewport. This can be easily tested in the widget gallery by selecting an item and then using down arrow (several times) to change the selection to an item in the bottom of the list.