Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tabbing through Pageframes
Message
From
07/05/1998 16:12:23
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00097807
Message ID:
00097844
Views:
18
>vfp 3.0 in win 95
>
>What is the best way to set up a pageframe so
>that when you get to the last field on the page
>it automatically goes to the next page?

Hello Becky,

I know you are going to get a different answer to your question from each person who responds. Here's mine:

Identify the last control in the taborder on a page. In its LostFocus() event, put the following code:
WITH this.parent
    IF .ActivePage+1 <= .PageCount
        .ActivePage = .ActivePage+1
    ENDIF
ENDWITH
When you set .ActivePage to a value other than its current value, VFP fires the .Activate() event for the new page -- you do not have to invoke it directly.

I actually do it a little differently with "previous" and "next" buttons on each page. The .visible setting of the previous button is switched to .F. in the activate() event of page 1, the .visible setting of the next button is switched off in the activate() event of the last page. If you set your taborder so that the "next" button is the last control in the taborder, then it would display the next page when the user types enter or attempts to tab out of the control.

I hope this helps.

Regards,

JME
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Reply
Map
View

Click here to load this message in the networking platform