> Close DataBases All > > Use Home () + "Samples\Data\employee.dbf" In 0 Alias MyRecordSource > > oGridTest = CreateObject ("frmGridTest") > > oGridTest.Show () > > Clear Events > > Close DataBases All > > > Define Class frmGridTest as cPtrForm >*------ ----- ----------- -- -------- > > Height = 315 > Width = 560 > Name = "frmGridTest" > Caption = " Grid Tests" > > Add Object grdTestGrid as cPtrGrid with Top = 5 , ; > Left = 5 , ; > Height = 275 , ; > Width = 550 , ; > RecordSourceType = 1 , ; > RecordSource = "MyRecordSource" > > Add Object cmdCancel as cPtrButton with Top = 285 , ; > Left = 480 , ; > Cancel = .T. , ; > Caption = "\<Close" > Procedure cmdCancel.Click >* --------- ----- > ThisForm.Release > EndProc > >*Procedure grdTestGrid.Column1.Header.Click >* ----------- ------- ------ ----- >* MessageBox ("grdTestGrid.Column1.Header1.Click") >*EndProc > > Procedure QueryUnload >* ----------- > ThisForm.cmdCancel.Click > > NoDefault > > Return .T. > EndProc > > EndDefine > > Define Class cPtrGrid as Grid >*------ ----- -------- -- ---- > > Top = 0 > Left = 0 > Height = 100 > Width = 100 > RowHeight = 17 > FontName = "arial" > FontSize = 8 > GridLines = 0 > DeleteMark = .F. > RecordMark = .T. > AllowCellSelection = .F. > AllowAutoColumnFit = 0 > HighlightStyle = 2 > > HighlightForeColor = RGB (255, 255, 255) > HighlightBackColor = RGB ( 0, 0, 128) > > ReadOnly = .T. > Visible = .T. > > EndDefine > > Define Class cPtrButton as CommandButton >*------ ----- ---------- -- ------------- > > Top = 0 > Left = 0 > Height = 25 > Width = 75 > > Enabled = .T. > Visible = .T. > Style = 0 > FontName = "Arial" > FontSize = 8 > > EndDefine > > Define Class cPtrForm as Form >*------ ----- -------- -- ---- > > AutoCenter = .T. > ShowWindow = 0 > BorderStyle = 2 > Enabled = .T. > AlWaysOnTop = .F. > WindowType = 1 > ScaleMode = 3 > FontName = "Arial" > FontSize = 8 > > EndDefine >