That's good, I must be doing something wrong then. I'm just running some basic code to see what layout I want to use. It's pretty close to the example in the Component Reference document. If you see what I'm doing wrong, I'd love to hear what it is.
This is the function I'm using to set up the roGridScreen:
Function ShowGrid()
port = CreateObject("roMessagePort")
grid = CreateObject("roGridScreen")
grid.SetMessagePort(port)
rowTitles = CreateObject("roArray", 10, true)
for j = 0 to 4
rowTitles.Push("[Row Title "+j.toStr()+" ] ")
end for
grid.SetupLists(rowTitles.Count())
grid.SetListNames(rowTitles)
grid.SetGridStyle("flat-16x9")
grid.SetDescriptionVisible(false)
for j = 0 to 4
list = CreateObject("roArray", 10, true)
for i = 0 to 2
o = CreateObject("roAssociativeArray")
o.ContentType = "episode"
o.Title = "[Title"+i.toStr()+"]"
o.ShortDescriptionLine1 = "[ShortDescriptionLine1]"
o.ShortDescriptionLine2 = "[ShortDescriptionLine2]"
o.Description = "[Description]"
o.Description = "[Description2]"
o.Rating = "NR"
o.StarRating = "75"
o.ReleaseDate = "03/25/2011"
o.Length = 196
o.Actors = []
o.Actors.Push("[Actor1]")
o.Actors.Push("[Actor2]")
o.Actors.Push("[Actor3]")
o.Director = "[Director]"
o.SDPosterUrl = "[poster url]"
o.HDPosterUrl = "[poster url]"
list.Push(o)
end for
grid.SetContentList(j, list)
end for
grid.Show()
while true
msg = wait(0, port)
if type(msg) = "roGridScreenEvent" then
if msg.isScreenClosed()
return -1
elseif msg.isListItemFocused()
print "Focused msg: ";msg.GetMessage(),"row: ";msg.GetIndex(),
print " col: ";msg.GetData()
elseif msg.isListItemSelected()
print "Selected msg: ";msg.GetMessage(),"row: ";msg.GetIndex(),
print " col: ";msg.GetData()
grid.ShowMessage("You selected Row "+Stri(msg.GetIndex())+" Column "+Stri(msg.GetData()))
endif
endif
end while
End Function
Thanks for your time,
-Keelin