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: 
RENJITHVR4
Level 7

roImageCanvas :: TargetRect is not working properly

hi,  I have an issue. I'm using roImageCanvas for making text input field with a keyboard. So from the document, we have roImageCanvas attributes - TargetRect.  Here it is not working with width.

I don't know what is the reason.
Here is my code




canvasRect = this.canvas.GetCanvasRect()

  

 m.Bwidth = canvasRect.w
 m.BHeight = canvasRect.h
txtArray = []

txtArray.Push({
            Text: "anything"
            TextAttrs: {color: "#000000", font: m.Myfont, HAlign: "Left"}
            TargetRect: {x:int(.44*m.Bwidth), y: int(.325*m.BHeight),w: int(.3375*m.Bwidth), h:int(.0879*m.BHeight)} 
            })  

Here w: int(.3375*m.Bwidth) is not working. If i change the value, it is not accepting. Please help me to resolve this issue.
0 Kudos