cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
lala
Level VII

How do I use the Enter key instead of clicking the "OK" button in JSL?

Make a dialog box with JSL, click "ok" to confirm, how can you also achieve confirmation by pressing the Enter key, without clicking "OK"?

2024-04-10_13-33-44.png

 

Thanks!

dt = Current Data Table();
ex = New Window( "",
	<<modal,
	Border Box( "", teb = Text Edit Box( "", <<Set Width( 500 ) ) ),
	Panel Box( "", H List Box( Button Box( "OK", ng = teb << get text ) ) )
);
3 REPLIES 3
jthi
Super User

Re: How do I use the Enter key instead of clicking the "OK" button in JSL?

lala
Level VII

Re: How do I use the Enter key instead of clicking the "OK" button in JSL?

  • I don't know how to fix it!

Thanks Experts!

jthi
Super User

Re: How do I use the Enter key instead of clicking the "OK" button in JSL?

You can set function to text edit box and it will trigger when the change is committed to text edit box. There is also Set focus on text edit box which can give some additional ideas
-Jarmo