Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Keyboard Control
Message
From
04/08/2002 22:42:21
Carmen Gassi
Perseus Software Systems
Oakville, Ontario, Canada
 
 
To
04/08/2002 22:32:16
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00686077
Message ID:
00686081
Views:
42
>Hi Bruce
Thanks for your reply. I was able to get around it by changing the structure of the if..endif clause in the AfterColumnChange event in the grid control. I took the parsing out of the keypress event and it now works fine.

Regards,
Carmen
Hi Carmen.
>I am no expert but have you tried a NODEFAULT in the trapping code?
>
>
>>Greetings All
>> I have a form which contains 2 grids. I have set up the form's KeyPreview property to .T. and I have used the KeyPress event to parse for acceptable input depending on the column that the user is in. The problem I am having is dealing with the user pressing the right arrow key. I only want the user to use the ENTER key to move to the right in the current row. If the user presses the right arrow key, and I want the code to intercept that keystroke and prevent the user from moving from the current column. I have tried the intercept code in three different places ( Keypress event, BeforeColumnChange and AfterColumnChange ). I am always able to identify the keystroke, but when I try to keep the cursor in the current column it fails. I have tried both the Keyboard "{leftarrow}" and activatecell() neither seem to work, the cursor still ends up in the next column to the right which triggers a method I only want triggered when the user has pressed the ENTER key while in the 1st column.
>>Suggestions appreciated.
>>
>>Regards,
>>Carmen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform