Public oForm oForm = Createobject('myForm') oForm.Show Define Class myForm As Form Height = 400 Width = 300 DataSession=2 Add Object myGrid As myGrid Procedure Init With This.myGrid .ColumnCount = -1 .AddColumn(1, 'clmFName', 'employee.First_Name', 'First Name') .AddColumn(2, 'clmLName', 'employee.Last_Name', 'Last Name') .AddColumn(3, 'clmTitle', 'employee.Title', 'Title') .Width = This.Width .Height = This.Height Endwith lnLeft = 0 For ix=1 To 3 lnLeft = m.lnLeft + This.myGrid.Columns(m.ix).Width + 1 Thisform.AddObject('myLine'+Ltrim(Str(m.ix)),'myLine',m.lnLeft,This.myGrid.Top,This.myGrid.Height) Endfor This.SetAll('Visible',.T.) Endproc Procedure Load Use employee In 0 Endproc Enddefine Define Class myGrid As Grid DeleteMark = .F. RecordMark = .F. GridLines=0 Procedure AddColumn Lparameters nIndex, cName, cControlSource, cCaption Nodefault This.AddObject(cName,'myColumn',nIndex, cControlSource, cCaption) With Evaluate( 'this.'+cName ) .Visible = .T. Endwith Endproc Enddefine Define Class myColumn As Column Procedure Init Lparameters nIndex,cControlSource, cCaption With This .ControlSource = cControlSource .ColumnOrder = nIndex .Header1.Caption = cCaption Endwith Endproc Procedure MouseMove Lparameters nButton, nShift, nXCoord, nYCoord *Find nearest line at right if any Thisform.SetAll('BorderColor',0,'myLine') Local oLine For ix=1 To 3 oLine = Evaluate("thisform.myLine"+Ltrim(Str(m.ix))) If Objtoclient(oLine,2) > m.nXCoord oLine.BorderColor = Rgb(255,0,0) Exit Endif Endfor Endproc Enddefine Define Class myLine As Line Width=0 Procedure Init Lparameters tnLeft,tnTop,tnHeight With This .Left = m.tnLeft .Top = m.tnTop .Height = m.tnHeight Endwith Endproc EnddefineCetin