Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Position of a Grid TextBox control in relation to the fo
Message
De
20/12/1998 02:40:07
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00169164
Message ID:
00169202
Vues:
25
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform