Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scrolling Grids
Message
De
25/02/2005 13:49:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00990619
Message ID:
00990652
Vues:
16
>Hi,
>
>I am sure that this topic has been covered before, but nonetheless, here it is again...
>
>I have a form with two grids linked to two separate tables with exactly the same structure. What I need to do is when scrolling horizontally on grid1, have grid2 scroll exactly the same way in either direction. It is not necessary to have the grids sync'd by row number as that is handled via a relation. It's the left / right movement that I am stuck on.
>
>Appreciate any and all advise on the subject.
>
>Vince

Try to start with this
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN



DEFINE CLASS form1 AS form


	Top = 1
	Left = 7
	Height = 568
	Width = 944
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"
	DATASESSION = 2

	ADD OBJECT grid1 AS grid WITH ;
		Height = 418, ;
		Left = 20, ;
		RecordSource = "aaa", ;
		Top = 75, ;
		Width = 256, ;
		AllowCellSelection = .F., ;
		Name = "Grid1"


	ADD OBJECT grid2 AS grid WITH ;
		Enabled = .F., ;
		Height = 418, ;
		Left = 492, ;
		RecordSource = "bbbb", ;
		Top = 75, ;
		Width = 256, ;
		Name = "Grid2"


	PROCEDURE Load
		CREATE CURSOR aaa (f1 i,f2 i,f3 c(10),f4 d DEFAULT DATE(),fg T DEFAULT DATETIME())
		FOR k= 1 TO 100
		APPEND BLANK
		NEXT
		LOCATE
		USE DBF() again IN 0 ALIAS bbbb
	ENDPROC


	PROCEDURE grid1.Scrolled
		LPARAMETERS nDirection
		IF M.nDirection>3
			thisform.grid2.DoScroll(m.nDirection)
		ENDIF
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform