Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Markup grid list column focused


I am using markup grid list in my roku app, in that list i have 3 columns in each row, i want user to focus only 2 columns i.e 2nd and 3rd column in each row.

The 1st column should not be focused and selected. Is this possible to achieve, if yes i would be very thankful.

0 Kudos

Re: Markup grid list column focused


This can be achieved by setting an observer to itemFocused.

m.MarkupGrid.observeField("itemFocused", "BlockFocus")

Function BlockFocus()
if m.MarkupGrid.itemFocused mod 3 = 0 or if m.MarkupGrid.itemFocused mod 3 = 1 (This is the edge case to check for all rows-left column)
jumpToItem = m.MarkupGrid.ItemFocused + 1 (forces it back to previous item)
end if
end Function
0 Kudos
Level 7

Re: Markup grid list column focused

I have a similar situation where I want to block the focus on middle item. I have 5 columns in my markupGrid and I want to block focus on 3rd item. 

'THis works really well right key is pressed but fails when LEFT key is pressed.
if m.grid.itemFocused mod 5 = 2 then
  m.grid.jumpToItem = m.grid.ItemFocused + 1
end if
0 Kudos