Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Is it Possible to change DialogBox Button text Font?

Jump to solution

I see three field(titleFont, messageFont, bulletTextFont) in DialogBox. But, I doesn't see the any field for button Font in Roku.

I tried with the below line.

' titleFont  = CreateObject("roSGNode", "Font")
' titleFont.uri = "pkg:/fonts/font.ttf"
' titleFont.size = 24
' optiondialog.buttons.textFont = titleFont 

or

' optiondialog.buttons.textFont.font.uri ="pkg:/fonts/font.ttf" 
' optiondialog.buttons.textFont.font.size =24

Here, Both lines gives an error. Is there any way to change DialogBox Button Text Font?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Level 11

Re: Is it Possible to change DialogBox Button text Font?

Jump to solution

ah, try

optiondialog.buttonGroup.textFont=font

 .buttons[] refers to the array of buttons  label text

You might want to change focusedTextFont as well 

View solution in original post

0 Kudos
5 Replies
Highlighted
Level 11

Re: Is it Possible to change DialogBox Button text Font?

Jump to solution
font  = CreateObject("roSGNode", "Font")
font.uri = "pkg:/fonts/font.ttf"
font.size = 24
optiondialog.buttons.textFont=font
0 Kudos
Highlighted

Re: Is it Possible to change DialogBox Button text Font?

Jump to solution
 
0 Kudos
Highlighted

Re: Is it Possible to change DialogBox Button text Font?

Jump to solution

Same thing, I tried with first option. But, It's giving a syntax error in this below line.

`optiondialog.buttons.textFont = titleFont`

 

0 Kudos
Highlighted
Level 11

Re: Is it Possible to change DialogBox Button text Font?

Jump to solution

ah, try

optiondialog.buttonGroup.textFont=font

 .buttons[] refers to the array of buttons  label text

You might want to change focusedTextFont as well 

View solution in original post

0 Kudos
Highlighted

Re: Is it Possible to change DialogBox Button text Font?

Jump to solution

Thank you for your Great Answer.

0 Kudos