Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mahadevllc
Channel Surfer

How to set the row item font

Hello All, 

 

I am using SGDEX,  m.grid = CreateObject("roSGNode", "GridView")

I am able to get the theme and update the textColor, rowLabelColor, itemTextColorLine1, itemTextFontLine1,

** Question ** 

but I really want to change the font of the component for itemTextColorLine1. but not able to get a handle to that component. Can someone help me? 

 

**** sample code **** 

m.grid = CreateObject("roSGNode", "GridView")
m.grid.SetFields({
style: "standard"
posterShape: "16x9"

showMetaData: false

})


m.grid.theme = {


textColor : "0xFF0000FF" ' red
' row label color is the category names like "partner content"
rowLabelColor : "0x00FF00FF" ' green
' this is the name of the show.. like "Met Gala 123"
itemTextColorLine1 : "0x0000FFFF"
itemTextFontLine1 : "font:SmallestBoldSystemFont"
}

0 Kudos
2 REPLIES 2
mahadevllc
Channel Surfer

Re: How to set the row item font

Bring this back to the top to see if someone has any suggestions. 

0 Kudos
speechles
Roku Guru

Re: How to set the row item font

You do not need to BUMP your post to the top. All post-bumping does is piss everyone off. We know that you replied to your own post just to do this. It makes it look like you are more important than anything. Like OMG, Why didn't anyone reply. Lets just force this to the top to force them to see it again. It isn't something that puts you in a good light. Ie, try never to do it again. Thanks. 🙂

You cannot use a field to change the font you want.

https://github.com/rokudev/SceneGraphDeveloperExtensions/blob/42cc84b97b411fc9218d8b14f22b4ef540cd97...

It is hard-coded in this section. There is no field that will change this. But one could be written to do so. Or you could just hard-code your font change in that section above.

 

https://github.com/rokudev/SceneGraphDeveloperExtensions/blob/42cc84b97b411fc9218d8b14f22b4ef540cd97...

There is also this part. You could just force the font to update with a single line.

Between line 75 and 76 add this:
line1.font = "fontURLhere"

That will override whatever the font was set and force it to the font you want for that line1.

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.