Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Static Grid
Message
De
02/04/2000 03:45:02
 
 
À
01/04/2000 19:42:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00353986
Message ID:
00354004
Vues:
20
Hi Antonio.

>> I have a grid with 2 columns. One column is read only and the other no. When the user type a value in the column that is updateable I would like to send the cursor to next line of the grid, if there is one next line. Otherwise, I would like to send the cursor outside of the grid. <<

Put this in the KeyPress of the text box of the updateable column:
IF INLIST( nKeyCode, 13, 9 )
   IF INLIST( GETFLDSTATE( JustExt( This.ControlSource ), JustStem( This.ControlSource ) ), 2, 3 )
     SKIP IN ( .RecordSOurce )
     IF EOF()
       SKIP -1 IN ( .RecordSOurce )
       *** Set focus to somewhere outside the grid here
       Thisform.SomeObject.SetFocus()
     ELSE
       This.Parent.Column1.SetFocus()
     ENDIF 
     NODEFAULT
   ENDIF
ENDIF
This is just off the top of my head and untestes, so you will probably have to modify the code, but I think you get the general idea.

Marcia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform