I have a modal window that asks user for text input using Text Edit Box.
For better user experience I'd like to make it so that when user hits Enter after typing in the input, it would be the same as user clicking OK button. Is there a way to do this?
win = New Window( "Text window",
<<Modal,
<<Return Result,
Text Box( "Type in your input" ),
textbox = Text Edit Box( <<Set script(/*Some script here to hit OK button when Enter is pressed */) ),
Button Box( "OK" ),
Button Box( "Cancel" )
);