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:
00015327
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.
>
>Has anyone done this?
>
>What i've got thus far is a form property which keeps track of the current page. It is set in the activate event of each page, after a check to see if they're in editmode and clicked on a different page. The message box shows okay, but the new page clicked retains focus.
>
>If there were a PostEvent function like in PB this would be a piece o' cake. How is it done in VFP 5.0???
>
>Thanks, Kim
>
>IF thisform.editmode AND THISFORM.LastActivePage <> 1
> MessageBox("Please Save or Cancel the current edit," + CHR(13) + ;
> "before switching to this tab.", 16, "Sorry...")
> DO CASE
> CASE THISFORM.LastActivePage = 2
> THISFORM.pgfOptions.Page2.Click()
> CASE THISFORM.LastActivePage = 3
> THISFORM.pgfOptions.Page3.Click()
> ENDCASE
> RETURN
>ENDIF

Hi Kim,
You have the idea you just need to reorganize it, let me tell you what I did, as you I use a property that let me know if I am in edit mode
or not, then as you did in the 'Activate' event I check if I am editing,
if I am, then I issue something like

THISFORM.pageframe1.activepage=pagenumber

that will set the focus to the page number 'pagenumber'
Hope this help.
Good Luck.
luisg@netrunner.net
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Previous
Reply
Map
View

Click here to load this message in the networking platform