kfamily7
Reel Rookie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023
04:26 PM
How to edit a text label from BRS file
Hey, new here, was wondering how could I edit a text label defined in the XML, from the brightscript file. Thanks.
2 REPLIES 2
sanity-check
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023
03:16 AM
Re: How to edit a text label from BRS file
Make sure your label has an ID in XML, e.g. id="mylabel", then you can do:
mylabel = m.top.findNode("mylabel")
mylabel.text = "My new text"
philanderson777
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023
02:21 AM
Re: How to edit a text label from BRS file
Yes as per documentation all these fields can easily be manipulated for text node
https://developer.roku.com/en-gb/docs/references/scenegraph/label-nodes/label.md
height="44"
width="0"
font="font:MediumBoldSystemFont"
text = "Application Development Made Easy!"
horizAlign = "left"
vertAlign = "center"
translation="[318,8]
mylabel.translation = [330,8] for example