Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor to next row in grid if last column looses focus
Message
 
À
10/06/2009 06:53:37
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Firebird
Application:
Desktop
Divers
Thread ID:
01404923
Message ID:
01405033
Vues:
51
Hi Cetin

I have been stretching your idea and here is what I have in Grid.AfterRowColChange()
	*** 11/06/2009 as suggested by Cetin on UT Message 1404932
	IF tnColIndex = 1 AND THIS.ROWCOLCHANGE = 2
		*** Tab 9, Enter 13
		IF INLIST(LASTKEY(), 9, 13)
			*** if facility enabled and last row has been reached
			IF .lLastRowColExit AND .LastRow()
				KEYBOARD '{CTRL+TAB}'
			ELSE
				KEYBOARD '{CTRL+DNARROW}'
			ENDIF
		ENDIF
	ENDIF
	
	IF tnColIndex = THIS.COLUMNCOUNT AND THIS.ROWCOLCHANGE = 2
		*** Shift+Tab 15
		IF INLIST(LASTKEY(), 15)
			*** if facility enabled and last row has been reached
			IF .lLastRowColExit AND .FirstRow()
				KEYBOARD '{CTRL+SHIFT+TAB}'
			ELSE
				KEYBOARD '{CTRL+UPARROW}'
			ENDIF
		ENDIF
	ENDIF
If you feel there is something I might have overlooked please correct me. Of course while reentering the grid using Shift+Tab, ie from bottom, the first column of the last row gets focus instead of the expected last column of the last row (from where it had exited the grid), any suggestions.

Thanks and regards.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform