Search code examples
rokubrightscript

Roku: How to change label text size


Bright script using scene graph. i want to change size of default font without Font node. I used "SmallestSystemFont" font. It appears large font then actual require size.

<Label id="myLabel" width="200" height="200" text="Hello Label" font="font:SmallestSystemFont"/>

Solution

  • Add this code to the script, attached to your component:

    myLabel = m.top.findNode("myLabel")
    myLabel.font.size = 20
    

    Every Label node has Font node inside. Thus you can simply access it and change its properties.