Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
Left / right navigation when ButtonGroup layoutDirection = horiz
Hello,
I'm trying to get a horizontal row of buttons to change focus when the left and right keys are pressed, but when I set layoutDirection="horiz" it still only uses up and down... I can't see what I'm doing wrong from the documentation. Any help would be appreciated!
Re: Left / right navigation when ButtonGroup layoutDirection = horiz
I have not posted it anywhere but I could. I ended up not even using the Button component from Roku. I made my own with rectangles and text nodes as I wanted to apply different colors for the active and non-active states.
Re: Left / right navigation when ButtonGroup layoutDirection = horiz
Don't think too much!!, Please feel free and try 'focusButton'. just in case, I used something like this!
//Sample Code function onKeyEvent(key as String, press as Boolean) as Boolean if key = "right" m.yourbutton.focusButton = 1 else if key = "left" m.yourbutton.focusButton = 0 end if end function