Set Focus - Forum - OpenEdge Development - Progress Community
 Forum

Set Focus

This question is answered

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

Verified Answer
  • 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
  • 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

  • Thanks Brian K.Maher it works

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