Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG, with container on column gotfocus is mistaken.
Message
 
À
30/08/2003 13:15:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00824808
Message ID:
00825148
Vues:
24
As I understand, the container control should contain another control i.e. textbox control to get the desired behaviour. This has been brought to the attention of MS coz I encountered C000005 run time error when doing the same scenario as you mentioned.

>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
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform