example I have
Function Example()
port = CreateObject("roMessagePort")
grid = CreateObject("roGridScreen")
grid.SetMessagePort(port)
rowTitles = CreateObject("roArray", 10, true)
for j = 0 to 10
rowTitles.Push("[Row Title " + j.toStr() + " ] ")
end for
grid.SetupLists(rowTitles.Count())
grid.SetListNames(rowTitles)
for j = 0 to 10
list = CreateObject("roArray", 10, true)
for i = 0 to 10
o = CreateObject("roAssociativeArray")
o.ContentType = "episode"
o.Title = "[Title" + i.toStr() + "]"
o.ShortDescriptionLine1 = "[ShortDescriptionLine1]"
o.ShortDescriptionLine2 = "[ShortDescriptionLine2]"
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() then
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()
Example()
endif
endif
end while
End Function
in the same function comes several times and give back to stay open while
Our system http://www.rokumanager.com