Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid keypress not working on last visible row.
Message
From
20/03/2000 14:34:10
 
 
To
20/03/2000 14:11:49
Glen Rostant
Cloud 9 Solutions, Inc.
Miami, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00348021
Message ID:
00348028
Views:
20
>Version: VFP 6.0
>Problem:
> The grid is large enough to displays 6 rows. There are 50 blank rows in all. On the last column.textbox I have the following code in the KeyPress event.
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>IF nKeyCode = 13 OR nKeyCode = 9 && Return or Tab
> SELECT c_det && Table assigned to grid
> IF !EOF()
> THISFORM.grid1.SetFocus
>
> THISFORM.grid1.ActivateCell(THISFORM.grid1.ActiveRow + 1,1)
> ENDIF
>ENDIF
>
>This event seems to work for all rows except the 6th. Instead of the focus going to the 7th row, it returns to the first column on the 6th.
>
>I'm sure I'm missing something simple, just been staring at the code too long. Please Help
>
>Galahad

Why not change the code to something like:
IF nKeyCode = 13 OR nKeyCode = 9 && Return or Tab
    SKIP IN c_det
    IF EOF("c_det")
        GO BOTTOM IN c_det
    ENDIF
    THISFORM.grid1.SetFocus
ENDIF
You can fiddle with as needed to set it up the way you want.
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform