General information
Category:
Coding, syntax & commands
>>>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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only