Forum Discussion
Function onKeyEvent(key, press) as Boolean
if press
if (key = "up") and m.channelList.isInFocusChain()
m.categoryRowList.setFocus(true)
return true
end if
end if
End Function
Stop using "setFocus(false)" at all. The MarkupList/Grid will swallow all the keypresses it can use. You won't get to react on them as it is done interally. Once it gets to the top or bottom it will pass those keys on. Since it can no longer go up or down once at the top or bottom. It will pass these keys into your MarkupList OnKeyEvent() function. So you do not need to check really if you are at the top and bottom of the markupgrid. If you press UP and it triggers in your OnKeyEvent the user was at the top of the grid. If they press DOWN and it trigger in your OnKeyEvent they were at the bottom of the grid.
If you can show the actual XML/Brightscript for your code it would be easier to show you what you are doing wrong. You are making it harder than it actually is to do.
Thanks my friend, I can solve the problem.