How can I use Return key to move next get

How can I use Return key to move next get

Postby Arindam » Wed Jun 20, 2007 2:04 pm

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  Expand view  RUN
     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
Arindam
 
Posts: 44
Joined: Sat Jul 29, 2006 5:03 pm
Location: Kolkata, India

Postby James Bott » Wed Jun 20, 2007 6:54 pm

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
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Armando » Wed Jun 20, 2007 10:06 pm

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
User avatar
Armando
 
Posts: 3242
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 47 guests