Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PageFrames and Page events.
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00015304
Message ID:
00015333
Views:
28
>don't want to enable the user to go to another page if they are in edit mode. Can't seem to find the right combo of events/properties to go back to the page they were previously on when they are in edit mode.
>
Actually this is a little complicated. You need two properties, one the activepageon and the second the ineditmode.

Now in the lostfocus event for each page put in code that says if in edit mode activepage=thisform.activepageon

In the gotfocus event, if in edit mode then issue a thispage.lostfocus and if not then change activepageon's value to activepage.

This is needed because of the event model which when you try and leave a page that is not allowed the following fires

page1.lostfocus (will go to page2 even if you reset the activepage)
page2.gotfocus
pageframe.activepage is set to 2
page2.lostfocus
page1.gotfocus
pageframe.activepage is set to 1

HTH
Todd Burstain, MD
infinitydoc@delphi.com
Previous
Reply
Map
View

Click here to load this message in the networking platform