<component name="GuideItemData" extends="ContentNode">
<interface>
<field id="labelText" type="string" />
<field id="X" type="integer" />
<field id="Y" type="integer" />
<field id="W" type="integer" />
<field id="H" type="integer" />
</interface>
</component>
<MarkupGrid
id="GuideGrid"
itemComponentName="GuideItem"
fixedLayout="true"
translation="[300,310]"
numRows="2"
numColumns="4"
rowHeights="80"
columnWidths="390"
itemSpacing="[3,3]" >
</MarkupGrid>
<?xml version="1.0" encoding="utf-8" ?>
<component name="GuideItem" extends="Group">
<interface>
<field id="itemContent" type="node" onChange="itemContentChanged"/>
</interface>
<script type="text/brightscript" >
<![CDATA[
function itemContentChanged()
itemData = m.top.itemContent
m.itemText.text = itemData.labelText
end function
function init()
m.itemText = m.top.findNode("itemText")
end function
]]>
</script>
<children>
<Rectangle
id="boundingRect"
color="#000000"
height="80"
width="390" >
<Label id="itemText" font="font:MediumSystemFont" height="80" width="390" vertAlign="center" horizAlign="center"/>
</Rectangle>
</children>
</component>
** Error - ArrayGrid Layout: Fixed Layout cell was already occupied
** cell 4, current item: 4, new item: 5
** Row (Y): 1 Column (X): 0 Width (W):1 Height (H): 1
** Error - ArrayGrid Layout: Fixed Layout cell was already occupied
** cell 8, current item: 0, new item: 8
** Row (Y): 1 Column (X): 3 Width (W):2 Height (H): 1
function onFocusChanged() as void
print "Focus on item: " + stri(m.guideGrid.itemFocused)
index = m.guideGrid.itemFocused
'Check if focused on offscreen column'
if (m.guideGrid.content.getChild(index).X = 4) then
count=0
'Iterate through all child nodes and decrement'
while (m.guideGrid.content.getChild(count) <> invalid)
m.guideGrid.content.getChild(count).X -= 4
count++
end while
endif
end function
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!
For support, visit support.roku.com.