Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Going to next line in Grid
Message
De
04/01/2000 09:26:30
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00312279
Message ID:
00312347
Vues:
23
Hi Mark.

>> Is there a way to make the focus go to the next record automatically. I tried putting a SKIP in the Valid event of the last column but it doesn't work. Also, the file has a bunch of empty records in it if you were wondering whether there where any records after the current one. <<

Put this code in the keyPress method of the textbox in the last grid column. If the columns are movable, it will fall over if the user moves the last column ;-)
LOCAL lnMaxRows

IF nKeyCode = 9 OR nKeyCode = 13
  WITH This.Parent.Parent
	SKIP IN ( .RecordSource )
        lnMaxRows = int ( ( .height - .headerheight - iif( inlist( .scrollbars, 1, 3 ), sysmetric( 8 ), 0 ) ) / .rowheight )
	IF .RelativeRow >= lnMaxRows
	  .DOSCROLL(1)
        ENDIF
	.ActivateCell( .RelativeRow + 1, 1 )
  ENDWITH
ENDIF			   
Marcia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform