Forum Discussion

chaklasiyanikun's avatar
5 years ago
Solved

Is it Possible to change DialogBox Button text Font?

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?

  • necrotek's avatar
    necrotek
    5 years ago

    ah, try

    optiondialog.buttonGroup.textFont=font

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

    You might want to change focusedTextFont as well 

5 Replies

  • font  = CreateObject("roSGNode", "Font")
    font.uri = "pkg:/fonts/font.ttf"
    font.size = 24
    optiondialog.buttons.textFont=font
      • chaklasiyanikun's avatar
        chaklasiyanikun
        Roku Guru

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

        `optiondialog.buttons.textFont = titleFont`