Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
KeyPress method - skip the class code
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01668315
Message ID:
01668351
Vues:
93
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I have a form's class with KeyPress method code. I have a form based on that form's class where I don't want to execute parent's class method. I added NODEFAULT in the KeyPress event and found that pressing keys in that form didn't do anything (e.g. input controls stopped operations).
>
>So, how can I have normal operation of KeyPress but prevent class method's to execute?
>
>Thanks in advance.

If you can modify the parent class, add a property like "skipkeypress" and in Keypress check this property to return without handling the code.

In Subclasses where you need to skip the Default Code, set this property to .T.
This adds complexity but seems to deal with your situation better than to overwrite completely.
Christian Isberner
Software Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform