Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scrolling form jumps back to top on activate
Message
De
12/06/2002 00:47:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00667009
Message ID:
00667223
Vues:
16
>If two forms are open and one has vertical scrollbars which the user has scrolled down to get a better view of a grid, moving to another form in the screen and then coming back to the form with scrollbars causes the form to scroll to top.

I've never used scrolling forms (rolled my own with containers) but if your position is lost when the form loses focus (you can fire up a messagebox to check if this happens on form.deactivate or when exactly), you can add a couple of properties to your form to save the scroll values at that point.

When your form activates again, compare these two values against the scrolled position of your form, and scroll the form programmatically to the saved position if they are different.

This is just my rule-of-thumb approach - "if it gets lost, save it before you lose it and restore it when you need it".

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform