Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting a control into a class.
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00554938
Message ID:
00555002
Views:
17
Hi!

Do not know if it will help, but you also can open form in design time, select your control and choose from VFP menu File->Save as Class... There is an option to save only selected items.

Why save in run-time?

>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
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform