Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
simranjit
Level 7

How to get the current width of Label ?

I have create the Label in XML. 

<Label
  id="testLabel"
  font="font:MediumBoldSystemFont"
  text = "Application Development Made Easy!"
  horizAlign = "left"
  vertAlign = "center"
  translation="[10,10]" />

How to get the width of label during run time, if text of this label is changed randomly.
Thanks.
0 Kudos
1 Reply

Re: How to get the current width of Label ?

You can use the ifSGNodeBoundingRect functions on the label: https://sdkdocs.roku.com/display/sdkdoc/ifSGNodeBoundingRect
0 Kudos