Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG, with container on column gotfocus is mistaken.
Message
De
30/08/2003 13:15:56
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
BUG, with container on column gotfocus is mistaken.
Divers
Thread ID:
00824808
Message ID:
00824808
Vues:
51
Hi,

If you put a container on a grid,
when you change cell, VFP fire the form GotFocus
and
not fire Container Gotfocus.
PUBLIC oform1

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

DEFINE CLASS form1 AS form

	Height = 600
	Width = 400
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"
	AllowOutput = .F.
	
	ADD OBJECT grid1 AS grid1 WITH ;
		Height = 400, ;
		Left = 10, ;
		RecordSource = "Test", ;
		RowHeight = 78, ;
		Top = 20, ;
		Width = 320, ;
		Name = "Grid1", ;
		Column1.Bound = .F., ;
		Column1.Width = 250, ;
		Column1.Sparse = .F., ;
		Column1.Name = "Column1"

	PROCEDURE Gotfocus
		? "Form GotFocus"
	PROCEDURE Lostfocus
		? "Form LostFocus"
		
	PROCEDURE Load
		CREATE CURSOR TEST (FF I DEFAULT RECNO())
		FOR I=1 TO 5
		 APPEND BLANK
		NEXT
		GO TOP 

	PROCEDURE UNLOAD
		USE IN SELECT('TEST')
ENDDEFINE

      DEFINE CLASS grid1 AS Grid
         ADD OBJECT column1 AS column1
      ENDDEFINE

      DEFINE CLASS column1 AS Column
         Width = 300
         ADD OBJECT header11 AS header
         ADD OBJECT container1 AS container

		PROCEDURE container1.init
			STORE this.AddObject('txt','TextBox') TO this.txt.Visible

		PROCEDURE container1.Gotfocus
			? "Container GotFocus"
			
		PROCEDURE container1.Lostfocus
			? "Container LostFocus"

	ENDDEFINE
Fabio
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform