Which button did I press?
Posted on 2002-07-15
I wanted to know if somebody with a little more than experience and knowledge that me, can help me with the following thing:
In a form of entrance of data, there is a series of TEdits where numeric values are entered. In one of them, the value is not allowed to be 0 (zero), so in the event TEdit1.OnExit I wrote a routine so that in case that the value is 0 it appears a MessageDlg with the error. But it happens that if I press the button to Cancel, AND I am in that TEdit, it evaluates the event OnExit and it doesn't cancel until it doesn't put a value <> 0.
Then, like this could solve? Is there a way to indicate in TEdit1.OnExit that I pressed the button to so it doesn't evaluate the condition?
Thank you and greetings for all those that read this message