Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Relative scroll position of grid
Message
De
21/09/2000 23:52:01
 
 
À
11/09/2000 10:52:48
Denis Filer
University of Oxford
Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00414908
Message ID:
00419516
Vues:
14
>When opening a grid linked to a DBF with say 10 records and with e.g. record 9 current in the DBF, the grid scroll position is such that one only sees the last record (or two) in the grid. Is there a way to "center" the grid scroll position so that when the grid appears, one can see more records with the selected record more or less central in the screen! Many thanks in advance.

You can use DoScroll() to manaully scroll your grid. Its been so long so I wrote this code, so I don't remember if it works, or what it did, but take a look at it.
*Grid.Refresh
local lcSel, lnRecs, lnCurRec

DoDefault()

lcSel=Select()
select (This.recordsource)
lnCurRec=recno()
count to lnRecs
locate record lnCurRec
if int((This.height - This.headerheight)/This.rowheight) > lnRecs
	This.DoScroll(2)
endif
select (lcSel)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform