oForm = Createobject('myForm') oForm.Show Read Events Define Class myForm As Form DataSession = 2 Add Object myGrid As Grid With ; ColumnCount=3 Procedure myGrid.Column2.DblClick Wait Window 'DblClick called2' Timeout 2 Endproc Procedure myGrid.DblClick Wait Window 'DblClick called' Timeout 2 Endproc Procedure Load Rand(-1) Create Cursor Test (f1 l,f2 l,f3 i) For ix=1 To 50 Insert Into Test Values ; (Int(Rand()*1000)%2=0,; Int(Rand()*1000)%2=0,m.ix) Endfor Locate Endproc Procedure Init With This.myGrid With .Columns(1) .AddObject('myCheck','myGridChkBox') .CurrentControl = 'myCheck' .myCheck.Visible = .T. .Sparse = .F. Endwith With .Columns(2) .AddObject('myCheck','myGridChkBox') .CurrentControl = 'myCheck' .myCheck.Visible = .T. .Sparse = .F. .myCheck.Check1.Enabled = .F. Endwith Endwith Endproc Procedure Unload Clear Events Endproc Enddefine Define Class myGridChkBox As Container Width = 14 Height = 17 BackStyle = 0 BorderWidth = 0 Name = "grdcheckbox" Add Object Check1 As Checkbox With ; Top = 0, ; Left = 0, ; Height = 17, ; Width = 13, ; BackStyle = 0, ; Caption = "", ; Name = "Check1" Procedure Init With This .Check1.ControlSource = .Parent.ControlSource .Resize() Endwith Endproc Procedure Resize With This.Check1 .Left = (This.Parent.Width - .Width)/2 Endwith Endproc Procedure Check1.DblClick This.Parent.DblClick Endproc Procedure DblClick This.Parent.Parent.DblClick Endproc EnddefineCetin