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.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RENJITHVR4
Visitor

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
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.