Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to copy a class in a .VCX
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Database:
Visual FoxPro
Divers
Thread ID:
01045315
Message ID:
01045322
Vues:
32
John,

Wouldn't it make more sense to subclass the calendar textbox class for your calendar clock textbox class? Then, you can just add your clock stuff and still override any of you calendar stuff where you need a slightly different behavior. Copying defeats the purpose of inheritance. Also, if you subclass it, and then need to make a change to the calendar portion of both controls, you only have to make the change once in the calendar class and the clock class will automatically inherit those changes. If you copy, you'll have to make your changes in both locations, too.

BUT, if you STILL want to copy the class... One simple way to do it is to add the class lib to the project manager. Add another class lib to the project manager. Expand both libraries. Drag the calendar class to another lib. Rename the calendar class in the new lib. Drag the newly named class back to the original lib. Delete the class from the other lib. Done.

HTH,
Chad

>I have a custom sub class of a text box in my .VCX file that has a number of methods to call a calendar when the user double clicks on the next box. I now have a calendar/clock control and would like to just copy that text box class within the .VCX so I don't have to recreate the entire class with minor changes to call the new control.
>
>Is there a way to copy the first text box class to a new one within the .VCX? I would like to keep this in VFP 6, if possible, as we are still moving everyting to VFP 9 but won't be done for a few months.
>TIA
_________________________________
There are 2 types of people in the world:
    Those who need closure
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform