Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Position of a Grid TextBox control in relation to the fo
Message
From
20/12/1998 02:40:07
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00169164
Message ID:
00169202
Views:
19
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform