Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PageFrame
Message
 
To
18/07/1998 10:13:39
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00118771
Message ID:
00119030
Views:
25
>>Is there a way to stop the user from moving from one page in a pageframe to another until certain conditions are met on the current page ?
>> Example : Say you had a property on your form that is true or false with default value of .f., when the user completed certain functions on page1 the property is set to .t., then they could move to another page, if the property were .f. they could not move to other page.
>>
>>Right now I am using the Activate of each page to check the form property for .t. or .f. and if .f. warning the user and setting the Parent.ActivePage to page they came from so they are returned to complete whatever ... This also allows them to use other controls
>>on form not contained in pageframe without firing off a warning.
>>
>>Thanks CB!!!
>
>Why not do the checking in page's DeActivate, and if something's missing, issue a warning and SetFocus on the forgotten control.

Actually that is the way I started and then found that when they clicked on another page it still moved to other page. The activate of the second page fires after the deactivate of the page they left. So I used the activate to call a form method to check conditions and if not met go back to page. The enable solution actually ended up being less complicated.

One really cool thing I learned in trying to figure out the firng order for the page avtivate and deactivate is I set event tracking to a file and then set it on in the deactivate of page1, on activate of page 2 I set it off. The file
it created showed everything in between. I will be using this a great deal for debugging in the future.

Thanks for reply.. CB
Previous
Reply
Map
View

Click here to load this message in the networking platform