>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.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao