Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PageFrame Page Activate vs Click()
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01474171
Message ID:
01474178
Vues:
53
>Hi,
>
>I have a form that has 7 pages/tabs on the PageFrame. And when user changes the page certain steps (code) have to be done. I have always put this code in the Activate method of the Page. But now I got to think that maybe it was a wrong approach. What I notice is that every time the form loses focus (when another form is opened) and then gets focus back the Activate of the page fires. So the code in the Activate executes again. This to me does seem to me wrong. So I am thinking of changing the approach and use Click() method of the page. This form has been initially created many years ago and I don't remember the logic of why I chose Activate (could have been simply because I didn't know of any better or simply didn't think much about it). And since I am concerned of breaking something, can anybody see a problem with "moving" the code from Activate to Click()? TIA.

I agree with James. I think Click will not fire if you, for example, activate the page by using hotkeys. Although you need to test various scenarios of accessing the page (keyboard access, for example).
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform