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: 
chaklasiyanikun
Roku Guru

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?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
necrotek
Roku Guru

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 5
necrotek
Roku Guru

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
chaklasiyanikun
Roku Guru

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

Jump to solution
 
0 Kudos
chaklasiyanikun
Roku Guru

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
necrotek
Roku Guru

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 

0 Kudos
chaklasiyanikun
Roku Guru

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

Jump to solution

Thank you for your Great Answer.

0 Kudos