Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting a control into a class.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Converting a control into a class.
Divers
Thread ID:
00554938
Message ID:
00554938
Vues:
46
I have a form into which I dropped a class that's based on a container called cListObjEdit (mere mortals control) that contains a grid, three buttons, and a business object (another container).

When I created this form, I added a number of methods as well as formatting to the cListObjEdit object on the form.

At the time, there was no reason to create a new class because this control was going to be used ONLY on this form.

Of course, that's not the case anymore: I need to use this cListObjEdit in another form.

If I would've known that this object was going to be reused, I would've created a subclass of the cListObjEdit class in another library and made all the mods there.

Is there a way to remove this object from the form as if it was a class and save it in a class lib of its own (a cListObjEctomy)?

I tried adding a button to the form and issue a "thisform.cListObjEdit1.saveasclass..." command in its click event to create a class based on that particular instance of cListObjEdit.

The class gets created, but the grid has no columns and none of my modifications are there. It's as if the new class was sub-classed directly from the cListObjEdit class.

In case this helps, the forms are vcx-based, not scx.

Any ideas?

Thanks!

Alex
Low-carb diet not working? Try the Low-food diet instead!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform