Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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 = []

            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