A Beginner said:
But before that, in order to visualize the class in it's construction process ie. adding object and viewing the effect, changing property and viewing the effect I will have to define it as form, isn't it?
Well, first I would like an english version of that sentence, but as far as I interpret it you think you must design visual stuff within forms. No, that isn't the case. The form designer is just one special designer for SCX, any other visual class than the form can be the basis of any class you design in a VCX, including forms, so designing a class via class designer, you can design partial forms, single controls and more, the form is just a special case you can design in the class designer. So the class designer and in general OOP class design offer much more capabilities than the form designer.
The only thing is you can't DO a class, you have to instanciate (create) it via CREATEOBJECT(). But whether you do that in code or within the designer is up to you, too. You can add controls at design time or runtime, that also means you can design several classes and as far as containership allows combine them into a next class, which kind of means your final class inherits from several previous classes. Ther is just one parent class in all cases, but that one base class can be form or container and you can then add in anything else. Container can contain container, so you can also nest objects, there also is no limit about this. All the classes you design as possible subforms or form components or pages or containers themselves not being forms can finally be put on a form class, which you either start by a combination of two code lines [tt]oForm = CREATEBOJECT("formclass")[/tt] and [tt]oForm.Show()[/tt] or if you want to be able to DO FORM yourform.scx, you create an empty SCX form you use to put your classes on it, or you base the SCX on a form class you already created as class, which kind of means you only convert the class to become an SCX with its simpler usage. Needing two instead of one line of code is not a big help, though, considering how much time it takes to get to this point, this is not a 50% savings issue. You see there are very many ways, but in OOP design you start from the single simple things and build up the form, not the other way around.
That said you can indeed create a form, put several things on it, then select a section and choose the item "save as class" from the file menu, then picking the option to only save selected elements. This will ask you to which vcx to store a class with which name, and then you have what I also suggested, a class, which mainly will be based on the container and contain the elements you picked. I find it easier to build up from detail to the whole form, though I understand developing a form concept is easier starting with the form level. The form level won't help you create several differently composed forms though, that obviously first needs the single components to put together in different ways to different forms, doesn't it?
Bye, Olaf.