Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get back to a page from it's deactivate?
Message
De
31/10/1996 09:45:23
Paul Wei
Fib, State of Michigan
Lansing, Michigan, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00011046
Message ID:
00011201
Vues:
49
>>>why not put the following code in the deactivate method if an error has occurred
>>>
>>>say on page 3's deactivate method
>>>
>>>
>>>if error (etc)
>>> thisform.pageframe1.activepage=3
>>>endif
>>>
>>>this should force the focus back to the page
>>
>>Tried that, didn't work. The clicked on new page got the focus anyway. I guess the ACTIVEPAGE method works everywhere except in the DEACTIVATE method.
>
>What a pain. You can force the issue as follows
>
>Create a property called pageon and a second property called
>pageok
>
>in the error check on the deactivate if ok set pageok to .t. else to .f.
>
>now in the activate page section of each page do a check
>if pageok set the pageon to the newpage else set the activepage to the pageon value
>
>Let me know if this doesn't work.
>
>HTH

Yes, that worked but I had to ckeck for PageOK in the DEACTIVATE method of the new page as well. Because, after setting the ACTIVEPAGE property of the pageframe to the old page in the ACTIVATE method, VFP executes the DEACTIVATE method of the new page as well before going back to the old page.

Thanks for your help.

Paul
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform