PRB: Pressing ESC Key Clears Contents of Text Box in a Toolbar
Article ID: 131301
Article Last Modified on 2/15/2000
APPLIES TO
- Microsoft Visual FoxPro 3.0 Standard Edition
This article was previously published under Q131301
SYMPTOMS
Pressing the ESC key before pressing the ENTER key when the insertion point
is in a text box, clears the content of the text box. However, doing the
same thing in a combo box does not produce the same behavior.
CAUSE
The ESC key is seen as a cancel operation for a text box object. In the
combo box object, the ESC key is a terminator for the drop-down list only.
WORKAROUND
In the text box object, it is possible to use the Keypress event to trap
for the ESC key. If the ESC key is pressed, a dialog box prompting the user
to save the data can be displayed. Please see the "Step-by-Step Example"
section of this article.
STATUS
This behavior is by design.
Additional query words: VFoxWin escape
Keywords: kbcode KB131301