Information générale
Catégorie:
Programmation Orientée Object
>How can I avoid this ? Is there maybe a way that I can test if the "Cancel" button has been clicked so that I can use an IF statement in my Valid event to only execute if "Cancel" has NOT been selected ? I've tried to set a flag in the click event of the Cancel command button but that doesn't work !
Here is a solution from Jim Booth:
*******
1) Set the Cancel property of the Cancel button to .T.
2) At the beginning of every Valid event put this code;
IF LASTKEY() = 27
RETURN .T.
ENDIF
The cancel property makes clicking the cancel button the same as pressing Escape. This has the added feature of making pressing Escape the same as clikcing the cancle button (that is the cancel button's click evnet will fire when pressing esacpe).
********
Précédent
Suivant
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