Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to find the absolute position of a row in a grid?
Message
From
14/03/2014 13:59:47
 
 
To
14/03/2014 12:18:25
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01596522
Message ID:
01596556
Views:
47
Thanks Marcia!

yeah, objtoclient. Couldn't think of it.

Peter



>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
>
Peter Cortiel
Previous
Reply
Map
View

Click here to load this message in the networking platform