>Does anyone know how to determine the position of a particular
>grid cell in relation to the Form, specifically the TOP and LEFT
>values ?
>
>The purpose is to be able to provide the user with the ability
>to double click on a particular cell and have a control appear
>exactly above that cell.
>
>Thanks.
>Michel.
Hello Michel,
Here is the basic simple code.
*--grid1.column1.text1.doubleclick()
loGrid = thisform.Grid1
lnTop = loGrid.Top + loGrid.HeaderHeight + ((loGrid.RelativeRow - 1) * loGrid.RowHeight)
(You need to check extra validations here , like if relativerow is 1 then do not subtract, etc.)
lnLeft = loGrid.Left
(assuming , recordmark and deletemark is .f. , if they are .t. , add their widh in lnLeft)
ThisForm.AddObject('lblOk','Label')
thisform.lblOk.Left = lnLeft
thisform.lblOk.Top = lnTop
thisform.lblOk.Visible = .t.
Kaumir
Avani Cimcon ,Ahmedabad,India.