tutash
9 years agoBinge Watcher
Creating a MarkupGrid itemComponent in code.
I want to create a MarkupGrid from code, not markup.
I can build a MarkupGrid like so:
My issue is with the field "itemComponentName". I believe that I should be able to create a node, give it an id, and point to the itemComponentName to it, but that's not working.
So, how would I go about building an "itemComponent" using Brightscript without markup?
Any suggestions?
I can build a MarkupGrid like so:
sub buildGrid()
print "GRID"
m.grid = createObject("roSGNode","MarkupGrid")
m.grid.translation = "[100,100]"
REM m.grid.itemComponentName = "gridItem"
m.grid.itemSize = [100,100]
m.grid.itemSpacing = [10,10]
m.grid.numColumns = 5
m.grid.numRows = 1
m.grid.content = m.content
m.top.appendChild(m.grid)
print m.grid
end sub
My issue is with the field "itemComponentName". I believe that I should be able to create a node, give it an id, and point to the itemComponentName to it, but that's not working.
So, how would I go about building an "itemComponent" using Brightscript without markup?
Any suggestions?