Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Cursor
Message
De
18/03/2005 12:36:45
 
 
À
18/03/2005 09:16:22
Justin Roper
The Cadle Company
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Novell 5.x
Database:
Visual FoxPro
Divers
Thread ID:
00997216
Message ID:
00997334
Vues:
11
I was wondering if it is possible to move the cursor on the grid to the next record other than a command like
SELECT RecordSourceTable
SKIP


Create a custom method on your grid class called Move2NextRow(). Call it whenever you want to move to the next row (provided the grid has focus when you do):
LOCAL lnMaxRows
WITH This
  *** Calculate the maximum number of rows in the grid
  lnMaxRows = INT( ( .Height - .HeaderHeight - IIF( INLIST( .ScrollBars, 1, 3 ), SYSMETRIC( 8 ), 0 ) ) / .RowHeight )
  *** If we are sitting on the bottom row in the visible portion of the grid,
  *** Scroll the grid down a row in case there is a next record			 
  IF .RelativeRow >= lnMaxRows
    .DoScroll( 1 )
  ENDIF   
  .ActivateCell( .RelativeRow + 1, .ActiveColumn )
ENDWITH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform