Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tips on creating MM Form classes from
Message
 
À
16/01/2002 17:26:45
Paul Williamson
Williamson Enterprises, Inc.
Livingston, Montana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00605598
Message ID:
00605880
Vues:
20
>Hi Alex!
>
>>
>>Why don't you just create your "base" form based on cBizObjForm?
>>
>
>I see it has Cancel, Delete, and New methods. Perfect. I put a NEW command button on it to add a new business object record and it did that. But, I had to put code in the click event of the button ("ThisForm.New()"). The sample project has no code behind the buttons. I traced and traced and couldn't find any that created the new record.
>
>Sorry for such basic questions, but where is the code for it and how do I get New, Add, Cancel,... to call the form methods w/o having to put code in the buttons?
>
>Thanks!
>
>-pw


There is a OK and a Cancel class in the kCustCtrl class library that you can use for a New & Cancel. For any others, you will need to drop a new button on the form, then add code to the Click() method to call the proper form method. The sample project doesn't have any code in the buttons because it's already contained in the parent classes of the forms used by the sample. For example, open up the cBizObjMaintenanceForm and look in the Click() method of the New button - that's where the code is hiding.

In your case, just subclass cBizObjForm or cBizObjFormModal and add the appropriate controls and any additional code. Save it into a new class library with a new class name. Then for any new forms that you create that need the same functionality, inherit from this new form class.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform