Hello
I am trying to figure out a way to switch the focus from one text field to another after pressing the enter key. Is what I am trying to do even possible? I figured having some scripting in the propertyChange event would get me the results I am looking for, but I am unsure how to make it work. Does anyone have a suggestion?
It's simple:
# written for the keyReleased event handler
if event.keyCode == event.VK_ENTER:
event.source.parent.getComponent('Text Field 2').requestFocusInWindow()
Apply the script to the first textbox's keyReleased event handler, and just change getComponent(Text Field 2
)` to the name of the text field that should receive focus next.
3 Likes
Thank you, works exactly how I need it to!
1 Like