Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Skip in recordsource or Scroll
Message
De
25/09/2010 07:29:57
 
 
À
24/09/2010 13:19:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01482559
Message ID:
01482695
Vues:
62
>Kevin --
>
>I have pursued this issue before here in the UT, and I'll tell you the suggestion that worked:
>
>The only way to insure that a particular record is at the top of a grid is to shrink the grid so that it only has one row. Then, if you re-expand it, the record you want will stay put. Here's the code I use
with .MyGrid
>     lnHeight = .Height
>     .Height = .HeaderHeight + .RowHeight + 5 + Iif( Inlist(.ScrollBars, 1, 3), Sysmetric(8), 0)
>     .Refresh
>     .Height = lnHeight
>endw 
>>I tried that and it does not seem to do anything, whereas the skip method worked but didn't end up where it should have. Is there some kind of trick to using the doscroll method? I do thisform.grid1.doscroll(0) and it does not scroll the grid up.

Add thisform.lockscreen=.T. before your code, and thisform.lockscreen=.F. after.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform