How to prevent xBrowse to move right after pressing Enter?

Post Reply
User avatar
leandro
Posts: 958
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia
Contact:

Re: How to prevent xBrowse to move right after pressing Enter?

Post by leandro »

Una idea :oops:
y si al final de la validación devuelves el foco a la misma columna.

Code: Select all

......
oCol:bOnPostEdit   = { | oCol, xVal, nKey | If( nKey == VK_RETURN, (....,oBrw:GoToCol( oCol )) ,) }
.....
 
Saludos
LEANDRO ALFONSO
SISTEMAS LYMA - BASE
Bogotá (Colombia)
[ FWH 19.09 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20190613) ] [ Embarcadero C++ 7.30 for Win32 ]
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: How to prevent xBrowse to move right after pressing Enter?

Post by ukoenig »

Enrico,

The test keeps the selected cell- columnposition after celledit

Code: Select all

LOCAL nColPos := 1
...
...
WITH OBJECT oBrw
     FOR I := 1 TO 5 // total defined columns
           :aCols[I]:nEditType := EDIT_GET 
           :aCols[I]:bOnPostEdit := { | oCol, xVal, nKey | ;
                    nColPos := oBrw:SelectedCol():nCreationOrder, ;
                    oBrw:SelectCol(nColPos) } 
     NEXT

     oBrw:CreateFromCode()
END
 
regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: How to prevent xBrowse to move right after pressing Enter?

Post by cnavarro »

Have you tried with lEnterKey2Edit := .T. and/or nMoveType := 5 ?
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: How to prevent xBrowse to move right after pressing Enter?

Post by ukoenig »

Christobal,
Have you tried with lEnterKey2Edit := .T. and/or nMoveType := 5 ?
sample xbposte-prg is showing the different tests using oBrw:nMoveType :!:

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: How to prevent xBrowse to move right after pressing Enter?

Post by nageswaragunupudi »

Code: Select all

oBrw:bKeyChar := { |n| If( n == VK_RETURN, 0, nil ) }
Regards

G. N. Rao.
Hyderabad, India
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: How to prevent xBrowse to move right after pressing Enter?

Post by Enrico Maria Giordano »

In that sample, try to change this

Code: Select all

o:nEditType := 0
and you will see that pressing Enter, the selection moves to the righ regardless of nMoveType.

How to stop this behavior?

EMG
Post Reply