Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PgUp/PgDn in Pageframes
Message
From
31/01/1999 13:54:18
 
 
To
31/01/1999 13:39:00
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00182291
Message ID:
00182293
Views:
11
>After doing pageframes in FPW using the Tabs driver, I have eagerly awaited my transition to VFP to use real pageframes <s>. To my horror, I find that pressing PgUp or PgDn does ....... nothing :(
>
>Best way of achieving this natively is ? My users are extremely used to getting to and from the last or next page by using these keys. I would have a riot on my hands if this functionality is not provided.
>
>Please help me stop a riot.

You'll have to put code in the form.keypress event handle this. To make sure that the form sees the keypress no matter what controls has focus, set Form.Keyprevier to .T. Then try some code like this in the keypress:
WITH THISFORM.PageFrame1
    IF nKeyCode = 3 && Page Down
        IF .ActivePage <> .PageCount && If the last page  is not already active
            .ActivePage= .ACtivePage + 1
            NODEFAULT
        ENDIF
    ENDIF
    IF nKeyCode = 18 && Page Up
        IF .ActivePage <> 1 && If the first page is not already active
            .ActivePage= .ActivePage - 1
            NODEFAULT
        ENDIF
    ENDIF
ENDWITH
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform