Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PageFrame Page Activate vs Click()
Message
 
 
À
27/07/2010 15:09:42
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01474171
Message ID:
01474176
Vues:
52
Thank you, James. I am trying to figure out (think through various scenarios) if anything else, other than a mouse click(), activates my form pages.

>Click will not work if the page is activated from somewhere else on the form. The only way to ensure that code will run is to use the activate event. I added some functionality to my pageframe class to check if a page is changing to ensure that the code only runs once with the page changes.
>
>>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.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform