Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Keyboard Control
Message
From
04/08/2002 22:08:27
Carmen Gassi
Perseus Software Systems
Oakville, Ontario, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Grid Keyboard Control
Miscellaneous
Thread ID:
00686077
Message ID:
00686077
Views:
88
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
Next
Reply
Map
View

Click here to load this message in the networking platform