btpoole
9 years agoChannel Surfer
markupgrid and markuplist scroll together
Is it possible to "bind" the rows of a markupgrid to markuplist so that the markupgrid scrolls along with the markuplist? Thought maybe setting the markupgrid.jumptoitem equal to the position (itemfocused) of the markuplist would work but doesn't seem to work. Using the example markuplist in the sdk I had modified as shown below. The index value is set but when remote down is pressed it doesn't enter that part of the else if. Does the grid have to have focus to scroll?
Thanks
Thanks
function onFocusChanged() as void
print "Focus on item: " + stri(m.simpleMarkupList.itemFocused)
print "Focus on item: " + stri(m.simpleMarkupList.itemUnfocused) + " lost"
index=m.simpleMarkupList.itemFocused
?"INDEX "index
end function
function onKeyEvent(key as String, press as Boolean) as Boolean
handled = false
if (m.simpleMarkupList.hasFocus() = true) and (key = "right") and (press=true)
m.simpleMarkupGrid.setFocus(true)
m.simpleMarkupList.setFocus(false)
?"key "key
handled = true
else if (m.simpleMarkupList.hasFocus() = true) and (key = "down") and (press=true)
?"key "key
m.simpleMarkupGrid.jumptoItem=index
else if (m.simpleMarkupGrid.hasFocus() = true) and (key = "left") and (press=true)
m.simpleMarkupGrid.setFocus(false)
m.simpleMarkupList.setFocus(true)
handled = true
endif
return handled
end function