Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Save existing form's object as a class
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00395678
Message ID:
00395711
Vues:
10
>Open the form in the form designer. Select the grid. Choose File | Save As Class from the main menu. The Save dialog allows you to specify whether you want to save the entire form or just the selected control, as well as what to call it and where to save it.
>
>Another way to add the grid at runtime would be to open the current form (with the grid) in the class browser, export the code, then copy and paste the grid-creation code into a custom method of your form. The drawback to this is that any future changes to the grid would need to be made to the method code rather than being able to edit a class.
>

Hi Rick & Larry,

Thanks a lot for your advise. I didn't know, that it's so easy :). I did it as you suggested and it works!



>>Hi everyone,
>>
>>Could you please tell me, if it possible to save form object as a new class and what should be the steps?
>>I have a form with 2 grids on it. Currently I remove one of the grid depending on parameters. These grids are completelly designed in design time. I'd like to save each grid as a class and instead of Removing grid in run-time I would add grid in run-time. This allows me to avoid the problem, which I currently have (grids RecordSource are different tables and their structures are different)
>>
>>Thanks in advance
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform