Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find the absolute position of a row in a grid?
Message
De
14/03/2014 12:18:25
 
 
À
14/03/2014 09:37:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01596522
Message ID:
01596539
Vues:
65
J'aime (1)
how do i get the position of a row in a grid to send to a popup screen to fit right under the row.

You don't need the row number. What you are looking for is OBJTOCLIENT(). You can use it to determine where to pop up your form relative to the selected cell in the grid.

Here is some code that I use to pop up a calendar underneath a textbox in a container. Should give you a good start:
*** Calculate where the popup calendar should be instantiated
*** So it pops up directly below the date text box
*** SYSMETRIC( 9 ) is the height of the Form's title bar in case you were curious
lnTop = OBJTOCLIENT( Thisform, 1 ) + OBJTOCLIENT( This, 1 ) + This.Height + ;
              IIF( Thisform.TitleBar = 1, SYSMETRIC( 9 ) + 2, 2 )
lnLeft = OBJTOCLIENT( Thisform, 2 ) + OBJTOCLIENT( This, 2 )

DO FORM Calendar WITH lnTop, lnLeft, This.txtDate.Value TO luValue
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform