Set Focus

Posted by Malick Muhammad Arsalan Noor on 26-Oct-2016 05:43

Hi,

In above window I just want to set cursor on Fill-In (Cust Num) when ever a this window load and set enter key to Search button.
How can apply such thing

Thanks 
Arsalan Noor

Posted by Brian K. Maher on 26-Oct-2016 06:16

Hi Arsalan Noor,
 
Open the window in the AppBuilder, select the frame within the window and from the AppBuilders menu bar select Edit -> Tab Order... then move the widgets around so that the tab order is what you want (i.e. the CustNum fill-in is first).  This will set that fill-in to get the focus when the window is opened.
 
Select the CustNum fill-in field then press Ctrl+S to open the Section Editor.  Click the “New...” button.  Click the “Keyboard Event...” button then press the enter/return key (this will set the event name to “RETURN”.  Press the “OK” button.  Press the “OK” button again.   You now have an ON RETURN OF <fill-in> code section defined.  Between the DO/END block add code like this:
 
APPLY “CHOOSE” to <your button name goes here>.
 
That should do it.
 
Brian

All Replies

Posted by Brian K. Maher on 26-Oct-2016 06:16

Hi Arsalan Noor,
 
Open the window in the AppBuilder, select the frame within the window and from the AppBuilders menu bar select Edit -> Tab Order... then move the widgets around so that the tab order is what you want (i.e. the CustNum fill-in is first).  This will set that fill-in to get the focus when the window is opened.
 
Select the CustNum fill-in field then press Ctrl+S to open the Section Editor.  Click the “New...” button.  Click the “Keyboard Event...” button then press the enter/return key (this will set the event name to “RETURN”.  Press the “OK” button.  Press the “OK” button again.   You now have an ON RETURN OF <fill-in> code section defined.  Between the DO/END block add code like this:
 
APPLY “CHOOSE” to <your button name goes here>.
 
That should do it.
 
Brian

Posted by Malick Muhammad Arsalan Noor on 26-Oct-2016 06:36

Thanks Brian K.Maher it works

Posted by Brian K. Maher on 26-Oct-2016 06:42

Glad to hear it.  Feel free to post new threads if you run into other questions.

This thread is closed