Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding bottom-scroll in grids
Message
De
23/02/2009 04:06:27
 
 
À
23/02/2009 03:07:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01383317
Message ID:
01383427
Vues:
50
Worked for me in my simple test case. It also doesn't seem to work if you step through it in the debugger. (Something about RelativeRow isn't set properly, I think) Just to be sure..........did you put it in the indicated event?

Grid.Column1.Text1.Keypress



>Hi Rich,
>
>Thanks, I tried your code, but there was no change in the grid's scrolling behavior.
>
>I previously tried using OKLs to turn off the down-arrow and page-down keys when
>the record pointer was on the bottom record, and that made no difference, either.
>
>I'm going to play with this some more on Monday.
>
>-mark
>
>================
>
>>>The Megafox book discusses how to have the bottom of a grid fill the last page when a form is being instantiated. I would like to know the solution to a slightly different problem. If I am on the bottom displayed row of a one-column grid and that also corresponds to the last row in the record source, pressing the down-arrow or page-down key will cause a single-row scroll. The action causes me to stay at the same point in the record source and on same grid cell (as it should), but there is now a blank row at the bottom of the grid. Is there a way to prevent this? Visually, when positioned at the bottom, I want a down-arrow or page-down keypress to result in no change to my grid's appearance.
>>>
>>>TIA,
>>>-mark
>>
>>FWIW.........I'm not sure I would agree with this behavior. Users tend to get antsy when they press a key and nothing happens. At least the default behavior lets them know they are at the bottom of the list.
>>
>>However, you might try this.
>>
>>In Yourgrid.Column1.Text1.Keypress.........
>>
>>LPARAMETERS nKeyCode, nShiftAltCtrl
>>IF INLIST(nKeyCode,24,3)
>>   SKIP
>>   IF EOF()
>>      GO BOTT
>>      IF this.Parent.Parent.RelativeRow = this.Parent.Parent.GridLines
>>            NODEFAULT
>>      ENDIF
>>   ELSE
>>      SKIP -1
>>   ENDIF
>>ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform