Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding screen row/col in a grid
Message
 
 
À
17/07/2000 09:46:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00393227
Message ID:
00393318
Vues:
16
>Hi Guys
>is it possible to know what screen row/col you are on while moving through a grid. i need to have a small grid follow the selected cell in a certain column. i presently have the small grid stationary somewhere else on the form, but it involves looking away from where the eye is following in the grid and is a pain.
>Thanx a ton - John

John,
I've never tried this but you might be able to get this using a combination of the Grid's Top, Left, HeaderHeight, RowHeight, ActiveColumn and RelativeRow properties. You can add the calcalation in the AfterRowColChange event (or add it to a method called from there) and move the other control accordingly.
With Grid
   lnx = .Top + .HeaderHeight + ((.RelativeRow -1) * .RowHeight)
   lny = Objtoclient(.Columns(.ActiveColumn),2)
Endwith
Objtoclient returns the specified (in this case Left) position relative to the form of the given object.

You will probably have to tweak this but hopefully, it should get you going.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform