Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form keypress Conundrum
Message
De
12/01/2006 10:57:59
 
 
À
11/01/2006 11:40:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01085658
Message ID:
01086104
Vues:
24
This message has been marked as a message which has helped to the initial question of the thread.
>Works like a charm!!!! Thanks so much!
>Here is my updated keypress event:
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>WITH THISFORM.PAGEFRAME
>   DO CASE
>      CASE nKeyCode = 18 .AND. nShiftAltCtrl = 0  && Page Up
>         NODEFAULT
>         IF VARTYPE(thisform.activecontrol) = "O" .and. !ISNULL(thisform.activecontrol)
>	     thisform.activecontrol.setfocus()
>    	 ENDIF
>         IF .ACTIVEPAGE > 1
>            .ACTIVEPAGE = .ACTIVEPAGE - 1
>         ELSE
>            .ACTIVEPAGE = .PAGECOUNT
>         ENDIF
>         DO CASE
>            CASE .ACTIVEPAGE = 1
>               .Page1.txtMap_csr.SETFOCUS()
>            CASE .ACTIVEPAGE = 2
>               .Page2.txtYn_split.SETFOCUS()
>            CASE .ACTIVEPAGE = 3
>               .Page3.txtAdr_name1.SETFOCUS()
>            CASE .ACTIVEPAGE = 4
>               .Page4.txtLp_chg.SETFOCUS()
>            CASE .ACTIVEPAGE = 5
>               .Page5.txtMendo_q1.SETFOCUS()
>            CASE .ACTIVEPAGE = 6
>               .Page6.txtMendo_q81.SETFOCUS()
>         ENDCASE
>      CASE nKeyCode = 3  .AND. nShiftAltCtrl = 0   && Page Down
>         NODEFAULT
>         IF VARTYPE(thisform.activecontrol) = "O" .and. !ISNULL(thisform.activecontrol)
>	    thisform.activecontrol.setfocus()
>    	 ENDIF
>         IF .ACTIVEPAGE < .PAGECOUNT
>            .ACTIVEPAGE = .ACTIVEPAGE + 1
>         ELSE
>            .ACTIVEPAGE = 1
>         ENDIF
>         DO CASE
>            CASE .ACTIVEPAGE = 1
>               .Page1.txtMap_csr.SETFOCUS()
>            CASE .ACTIVEPAGE = 2
>               .Page2.txtYn_split.SETFOCUS()
>            CASE .ACTIVEPAGE = 3
>               .Page3.txtAdr_name1.SETFOCUS()
>            CASE .ACTIVEPAGE = 4
>               .Page4.txtLp_chg.SETFOCUS()
>            CASE .ACTIVEPAGE = 5
>               .Page5.txtMendo_q1.SETFOCUS()
>            CASE .ACTIVEPAGE = 6
>               .Page6.txtMendo_q81.SETFOCUS()
>         ENDCASE
>      OTHERWISE
>         DODEFAULT()
>   ENDCASE
>ENDWITH
>
this is a old bug.
WITH THISFORM.PAGEFRAME
   DO CASE
      CASE nKeyCode = 18 .AND. nShiftAltCtrl = 0  && Page Up
         NODEFAULT
         .Pages[ EVL(.ACTIVEPAGE - 1,.PAGECOUNT)].Setfocus
         DO CASE
            CASE .ACTIVEPAGE = 1
               .Page1.txtMap_csr.SETFOCUS()
            CASE .ACTIVEPAGE = 2
               .Page2.txtYn_split.SETFOCUS()
            CASE .ACTIVEPAGE = 3
               .Page3.txtAdr_name1.SETFOCUS()
            CASE .ACTIVEPAGE = 4
               .Page4.txtLp_chg.SETFOCUS()
            CASE .ACTIVEPAGE = 5
               .Page5.txtMendo_q1.SETFOCUS()
            CASE .ACTIVEPAGE = 6
               .Page6.txtMendo_q81.SETFOCUS()
         ENDCASE
      CASE nKeyCode = 3  .AND. nShiftAltCtrl = 0   && Page Down
         NODEFAULT
         .Pages[ EVL(.ACTIVEPAGE - 1,.PAGECOUNT)].Setfocus
         DO CASE
            CASE .ACTIVEPAGE = 1
               .Page1.txtMap_csr.SETFOCUS()
            CASE .ACTIVEPAGE = 2
               .Page2.txtYn_split.SETFOCUS()
            CASE .ACTIVEPAGE = 3
               .Page3.txtAdr_name1.SETFOCUS()
            CASE .ACTIVEPAGE = 4
               .Page4.txtLp_chg.SETFOCUS()
            CASE .ACTIVEPAGE = 5
               .Page5.txtMendo_q1.SETFOCUS()
            CASE .ACTIVEPAGE = 6
               .Page6.txtMendo_q81.SETFOCUS()
         ENDCASE
   ENDCASE
ENDWITH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform