Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent Parent code from running on form command button
Message
 
 
À
18/07/2005 13:17:00
Joel Hokanson
Services Integration Group
Bellaire, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
OS:
Windows XP
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01033592
Message ID:
01033594
Vues:
14
>I am using the Form builder wizard to make a data screen of a single table (an SQL view). I wish there was a little more powerful and more user-friendly Forms wizard.
>
>It works OK, but how do I change the code that is done on a click of a certain button.
>
>For example, I do NOT want to allow delete. I want to change the code that is activated on Delete CLICK.
>
>When I look at code on cmdDelete.click there is no code, but is does do the default code and you can see that by clicking on View Parent Code.
>
>****How do I prevent the Parent code from running? ***
>
>I will just ad my code on the click and then NOT run the parent code.

If you add your code to the button's click, you're overwritting the default behavior. If you want to use default code, you need to call dodefault.

E.g. suppose you added a new property lAllowDelete to the form.

Then your button's click would look like:
if thisform.lAllowDelete
   dodefault() && Execute default Delete button click
endif
E.g. nothing would happen if you set your property to .f.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform