Roy
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2012
09:22 AM
setGridStyle(), setDisplayMode() not working in roGridScreen
When I run the following code, I get a portrait-shaped poster with my image stretched vertically to fit (as if I had used "scale-to-fill"). No combination of arguments to setGridStyle() or setDisplayMode() makes any difference. What am I doing wrong?
function main()
screen = CreateObject("roGridScreen")
port = CreateObject("roMessagePort")
screen.SetMessagePort(port)
screen.setupLists(1)
screen.setListNames(["my row"])
screen.setGridStyle("flat-landscape")
screen.setDisplayMode("zoom-to-fill")
o = {}
o.HDPosterUrl = "http://songza.com/api/1/station/1396578/image"
screen.setContentList(0, [o])
screen.show()
while true
msg = wait(0, port)
if msg.isScreenClosed() return -1
end while
end function
3 REPLIES 3


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2012
09:34 AM
Re: setGridStyle(), setDisplayMode() not working in roGridSc
You need to call SetGridStyle() before you call SetupLists() or SetListNames()
Roy
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2012
09:39 AM
Re: setGridStyle(), setDisplayMode() not working in roGridSc
"RokuChris" wrote:
You need to call SetGridStyle() before you call SetupLists() or SetListNames()
OK, that fixed it. You really should update your docs to mention this.
kyleabaker
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2015
07:48 AM
Re: setGridStyle(), setDisplayMode() not working in roGridSc
"RokuChris" wrote:
You need to call SetGridStyle() before you call SetupLists() or SetListNames()
This documentation has still not been updated to reflect this requirement. Just ran into it myself. The page that needs to be updated is here:
http://sdkdocs.roku.com/display/sdkdoc/ifGridScreen#ifGridScreen-SetGridStylestyleasStringasVoid