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