Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving down in a grid without using DOWNARROW
Message
De
19/07/2000 22:15:42
 
 
À
19/07/2000 05:12:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00394228
Message ID:
00394711
Vues:
11

Try this:
*!* Begin Sample

USE
DELETE FILE foo.DBF
CREATE TABLE foo (a c(1), b c(1), c c(1), d c(1), e c(1))
FOR i = 1 TO 5
	APPEND BLANK
	REPLACE a WITH [a]
	REPLACE b WITH [b]
	REPLACE c WITH [c]
	REPLACE d WITH [d]
	REPLACE e WITH [e]
ENDFOR

GO TOP

PUBLIC HowManyEnters
HowManyEnters = 0
PUBLIC oForm1
oForm1 = CREATEOBJECT([oForm])
oForm1.SHOW
oForm1.AUTOCENTER = .T.

DEFINE CLASS oForm AS FORM
	ADD OBJECT oGrid1 AS oGrid
ENDDEFINE

DEFINE CLASS oGrid AS GRID
	ADD OBJECT oColumn1 AS oColumn
	ADD OBJECT oColumn2 AS oColumn
	ADD OBJECT oColumn3 AS oColumn
	ADD OBJECT oColumn4 AS oColumn
	ADD OBJECT oColumn5 AS oColumn
ENDDEFINE

DEFINE CLASS oColumn AS COLUMN
	WIDTH = 20
	ADD OBJECT oText1 AS oText
ENDDEFINE

DEFINE CLASS oText AS TEXTBOX
	WIDTH = 10
	PROC KEYPRESS
	LPARAMETERS nKeyCode, nShiftAltCtrl
	IF LASTKEY() = 13
		HowManyEnters = HowManyEnters + 1
		IF HowManyEnters = 5
			KEYB [{DNARROW}]
			HowManyEnters = 0
		ENDIF
	ENDIF
ENDPROC
ENDDEFINE

*!* End Sample
Dave



>i have a grid with 5 columns. I am on the first record and i move with ENTER until column5 and when i press ENTER again i want to go to the first column on the next record of the grid, not on the first column of the actual record.
>I try to put in the valid event of column5.text1 SKIP, but it not working.
>I try to put in the lostfocus event of column5.text1 thisform.command1.setfocus and in the command1.gotfocus SKIP and thisform.grid1.setfocus but it's skiping 2 record !!!
>
>Please HELP MEEEEEEEEEEEE !!!!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform