Forum Discussion
Veeta
9 years agoVisitor
Just had a look at the docs and it seemed like something was missing so i tried it out with the SceneGraphXMLTutorial code.
Markupgrid is different from, say, RowList in that it doesn't map 2D data and give 2D indices into that data. Rather, it takes a linear list of data and it just lays out that linear list on screen by wrapping based on the value of numColumns.
So your row and column would be
If you use the sections dividers, i don't have an answer there. You'd have to account for empty places in the grid as you encountered each section divider. In that case I would personally use a different component such as RowList.
Markupgrid is different from, say, RowList in that it doesn't map 2D data and give 2D indices into that data. Rather, it takes a linear list of data and it just lays out that linear list on screen by wrapping based on the value of numColumns.
So your row and column would be
rowFocused = itemFocused \ numColumns
columnFocused = itemFocused MOD numColumns
If you use the sections dividers, i don't have an answer there. You'd have to account for empty places in the grid as you encountered each section divider. In that case I would personally use a different component such as RowList.