<?xml version = "1.0" encoding = "utf-8" ?>
<!--********** Copyright 2016 Roku Corp. All Rights Reserved. **********-->
<component name = "RowListExample" extends = "Scene" initialFocus = "mybutton" >
<script type = "text/brightscript" >
<![CDATA[
sub init()
m.top.backgroundURI = "pkg:/images/rsgde_bg_hd.jpg"
m.rowlist = m.top.findNode("exampleRowList")
mybutton = m.top.findnode("mybutton")
mybutton.observeField("buttonSelected", "clicked")
m.rowlist.content = CreateObject("roSGNode", "RowListContent")
m.top.setFocus(true)
end sub
function clicked()
? " MyButton clicked :: setting focus on rowlist"
if m.rowlist = invalid then m.rowlist = m.top.getchild(1)
m.rowlist.setFocus(true)
end function
]]>
</script>
<children >
<Button id="mybutton" minwidth="300" height="100" text="click me" translation = "[ 130, 30 ]" />
<RowList
id = "exampleRowList"
translation = "[ 130, 160 ]"
itemComponentName = "RowListItem"
numRows = "4"
itemSize = "[ 1608, 308 ]"
rowItemSize = "[ [512, 288] ]"
rowItemSpacing = "[ [40, 0] ]"
itemSpacing = "[ 0, 40 ]"
showRowLabel = "[ true ]"
focusBitmapUri="pkg:/images/highlight_focus.9.png" />
</children>
</component>
sub showfocus()
'scale = 1 + (m.top.focusPercent * 0.08)
'm.itemposter.scale = [scale, scale]
end sub
function clicked()
? " MyButton clicked :: setting focus on rowlist"
m.rowlist.setFocus(true)
mybutton = m.top.findnode("mybutton")
mybutton.setFocus(true)
m.rowlist.setFocus(true)
end function
m.rowlist.setFocus(true)
m.rowlist.setFocus(false)
m.rowlist.setFocus(true)
i need help for this too not the solutions mentioned are not working for me.