Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
the_mace
Level 7

MarkupGrid Scroll Speed

I have a big MarkupGrid and when I press and hold the down button it scrolls down at a fixed speed. I want the speed to accelerate the longer I hold the button. Anyone have any ideas on how to do that? My guess right now is along the lines of intercepting the button and creating a custom event loop. Seems like this should be some kind of global Roku feature though...
0 Kudos
1 Reply
the_mace
Level 7

Re: MarkupGrid Scroll Speed

I ended up doing the following:

1) Watch for down or up button presses or releases on my grid
2) Start a timer on button press and move up or down 1 row (don't wait for timer on first press).
3) Adjust timer fire rate on each timer fire event and move up or down one row on each fire
4) Kill timer on button release
5) Kill timer if you hit the end in either direction.

That way I got to a non-linear scroll speed like you see on other devices.
0 Kudos