Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing for header click in a grid
Message
From
29/07/2003 09:39:48
 
 
To
29/07/2003 08:40:40
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00814471
Message ID:
00814496
Views:
11
Hi Alan,

>Where is this code? Is there a column19 when you create the grid?

In order to be easier to reproduce the problem I'm having, I changed a bit the code (see below) and used a sample VFP 8 dbf. Also changed "column 19" to "column 1". Just paste the VFP code in a prg file and run it.

Thanks!
 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform