Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ActivePage...Not!
Message
De
07/05/2001 12:12:49
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00503661
Message ID:
00504251
Vues:
18
Nadya,

I finally got this to work, but I think it was mostly because I was calling a ThisForm.Refresh in the wrong place. I'm not sure why that made a difference, but it did. I used your suggestions as well, but had a couple followup questions...

>First of all, don't put this code in Valid, put it in Click event of the button.

I've heard that before, but why? Does it have to do with when events are triggered? What should go in the Valid if we can use the Click instead? I know developers who insist that it should be the other way around, but they don't seem to know why.

>You also don't need to call page activate and page setfocus() methods. In each page Activate method put this code: this.Activate (e.g. each time page is activated, it's refreshed).

My problem here was that I needed to be at a specific field depending on the mode of the form (ie, Edit, Add, Cancel, etc.) and be able to return to whereever I came from on the form. The SetFocus call works fine in the command button Click on the origin page, but is it better to have it in the Activate of the destination page instead with a Case statement to handle the conditions?

>Finally, I have a habit to avoid macros, if it's not necessary. In this particular case you can use:
>loPage=evaluate("thisform.t48_page_frame1."+m.cLastPage)
>loPage.Activate()

I've heard this someplace before also... Do you know why the Eval is more stable?

Thank you for your help! Renoir
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform