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" ENDDEFINEFabio