Closed bryevdv closed 10 months ago
Not a high priority, but since we have horizontal movement with the arrows, I found myself wanting to do the same thing with the vertical arrows.
This seems achievable using config.scroll_to_item
by searching for any next / previous item to assign, but I was going to look into whether the UI viewport could just be generically scrolled programatically.
I would not use the scroll_to_item
code directly, but I think it's an illustrative example of how to accomplish a programmatic vertical scroll. Here's the relevant code:
The relevant API is ui.scroll_to_rect
which can be given any rectangle, not just ones concerning a specific item. So all we need to do is calculate the appropriate rectangle to scroll to (whether an item is there or not) and figure out the most elegant way to thread that information through the system.
@lightsighter has requested that up/down arrows also be usable, in order to scroll the panel of plots up and down.