Skip to main content
MCadu
Associate II
March 14, 2019
Question

How do I move elements within a scroll list without a touch screen?

  • March 14, 2019
  • 1 reply
  • 565 views

I'm new to C++ and I've been reading about the buttoncontroller and keysampler but how do I move on element in the scroll list up or down upon a button pressed event?

This topic has been closed for replies.

1 reply

cameronf
Associate
March 14, 2019

You can use the animateToItem method defined in ScrollBase to manually move to a given item in your list.

virtual void animateToItem(int16_t itemIndex, int16_t animationSteps = -1);

So you can keep track of your current item index and increment/decrement it with your button presses.