Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Backward scrolling in grid causes next rec to jump to middle
Message
De
30/03/2005 11:47:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Backward scrolling in grid causes next rec to jump to middle
Divers
Thread ID:
00999967
Message ID:
00999967
Vues:
62
I have a grid control operating as a listbox. Users can use the grid to navigate to different records in a specific query. Users can also use Next/Previous buttons to navigate between records as well.

My Next/Previous buttons update the grid's current record via Skip +1/Skip -1 followed by a Grid.Refresh() so that the currently selected record in the grid matches the record being worked on in the detail portion of the form.

Unfortunately, when the active record is at the top of the grid, the Skip -1 technique causes the grid to not scroll just a single record up, but the number of records required so that the new active record is vertically positioned in the middle of the grid. I would like to disable this behavior.

Is my only solution to add logic to my grid's Refresh() to LockScreen = True, detect that we've made a Skip -1 type request, then DoScroll() to correct the vertical centering. This seems very inefficient if a user is moving backwords through a grid as this logic will be repeated every time they click on the Previous record button.

I'm using VFP 9.

Thank you,
Malcolm
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Répondre
Fil
Voir

Click here to load this message in the networking platform