Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pageframe Page Activate vs. Click methods
Message
De
11/09/2018 03:10:41
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/09/2018 00:48:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01661937
Message ID:
01661957
Vues:
51
>>This is why I asked the question so that I can avoid the "bite me later on" thing. What you are saying makes sense.
>>And I realized that what I need to do is to change the code in my Activate method and call form.Refresh() only when user actually changed from one page to this page. But if this page Activate fires simply because the form gets focus back, the form.Refresh() should not be called.
>>Thank you.
>
>Another option is to add a custom property to a page ("PageX"), named something like .NeedsRefresh, with a logical value. If changes on another page (or anywhere else, for that matter) require a refresh of PageX, it can set PageX.NeedsRefresh = .T.
>
>The code that refreshes PageX has PageX.NeedsRefresh = .F. at its bottom.
>
>PageX.Activate() only calls the refresh code if .NeedsRefresh = .T.

I was thinking about the "form gets focus back", in the same way. When form loses focus (i.e. in .deactivate()), set a form.needsrefresh=.f. (but set it when recno() changes and in other situations when it really needs it), so when in .activate() check for that property and call .refresh() if it's true. I think I've actually seen this somewhere in use.

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