Information générale
Catégorie:
Gestionnaire d'écran & Écrans
You can also handle RightArrow and other keys at the TextBox level with a classed txtBox added as the Currentcontrol within Grid column.
Just another suggestion,
-Irv.
>>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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement