Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get back to a page from it's deactivate?
Message
 
To
29/10/1996 16:41:33
Paul Wei
Fib, State of Michigan
Lansing, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00011046
Message ID:
00011138
Views:
39
>>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
Todd Burstain, MD
infinitydoc@delphi.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform