Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with lost focus of textbox in grid column
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00949487
Message ID:
00949588
Views:
7
Chuck,

Sorry, I misread your original post and thought you were doing this from the lostfocus event. In any case, would the following work?
LPARAMETERS nColIndex
IF nColIndex = 5 AND NOT LASTKEY() = 5 AND NOT LASTKEY() = 24
   KEYBOARD '{DNARROW}'
ENDIF 
Regards,
Jim

>The problem is that the user does not want to press the down arrow, just have the cursor move to the next record for input BUT...if editing another record the default AllowAddNew behavior makes the cursor jump to the last record and arrow down no matter what record you are on.
>My code is like this in the beforerowcolchange event:
>
>* Method..: grdcentrex.beforerowcolchange
>* in the last column (amt) and last keystroke is not "up-arrow"
>* any other key go down
>LPARAMETERS nColIndex
>IF nColIndex = 5 AND LASTKEY()#5
>    KEYBOARD '{DNARROW}'
>ENDIF
>
Jim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform