Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can i move focus from one texteditbox to another texteditbox?

I want to move focus from one username to password or vice versa.Is there any predefined focus option or I need to true and false focus on key event.
 it 
https://drive.google.com/file/d/0B42scj ... sp=sharing
0 Kudos
1 REPLY 1
EnTerr
Level 11

Re: How can i move focus from one texteditbox to another texteditbox?

Not sure i quite understand the question but - at any one time only 1 component can have the input focus (often simply "focus") in a scene. Now, if that component does not handle the input event (by having onKeyEvent() return `true`), it will "bubble up" the component tree till a node handles it explicitly or by default behavior. To this, a single `.setFocus(true)` on a node takes the focus away from the previous holder - in a way it's like passing the baton in a relay race.
0 Kudos