How can I use Return key to move next get

Post Reply
Arindam
Posts: 44
Joined: Sat Jul 29, 2006 5:03 pm
Location: Kolkata, India

How can I use Return key to move next get

Post by Arindam »

Hi Everybody,

While I am pressing ENTER on Combobox, Cursor do not move in next get field. If I press Tab bottom, then only Cursor move to next field.

How Can I use Enter, to move Cursor to next field. My code is as follows.

Code: Select all

     REDEFINE COMBOBOX oCbx VAR cCuTy ITEMS  { "URBAN ", "RURAL ", "DEEPAM", "COMMON" }               ; 
      ID 2 OF oDlg1                                                                                   ; 
      ON CHANGE MsgBeep()                                                                             ; 
      Valid If(cCuTy = oCbx:aItems[1],  (oArea:AreaType := "U", .T.), If(cCuTy = oCbx:aItems[2],      ; 
                                        (oArea:AreaType := "R", .T.), If(cCuTy = oCbx:aItems[3],      ; 
                                        (oArea:AreaType := "D", .T.), (oArea:AreaType := "C", .T.)))) ; 
      Picture "@!" Color RGB(0, 0, 0), RGB(255, 255, 255) 

With regads,

Arindam
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Arindam,

Using the Enter key is DOS behavior not Windows behavior so I don't recommend using it. Under Windows the Enter key should trigger the OK button on the dialog. The Tab key is what users expect to use to move from field to field. This way the user can press the Enter key anytime to close the dialog without using the mouse.

If you still want to use it, then check the "Want Return" checkbox for the control using Workshop.

James
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Post by Armando »

Arindam:

Perhaps the problem is in the VALID code, pls remove that code and
test it again.

BTW, you do not need that code, if your field is one character length then only the capital letter will saved.

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Post Reply