>> >simply pasted it into the proper form class definition, and got the
>> >incredible original path to the temp classlib hard welded in.
>>
>> Have you tried to open the right VCX as a table? I usually fix this kind of
>> problem changing the value directly into the VCX. I don't remember which is
>> the field you'll have to look at (I'm not with Vfp now) but you can easily
>> find it.
>
>Well of course - that was the first thing I tried, and had to restore at
>once. The trouble with treeview (and probably other aXes, too) is that
>they don't exist as separate class definitions in a .vcx, but only
>within an OLE container, and yet do appear as if there's no container.
>So, in order to move it out, you need to know the container, which seems
>to have no name... damn, I even tried Append From tmp.vcx, but that
>didn't work either.
>
>I tried to instantiate the container, and to saveasclass into a new
>..vcx, got an empty form class. Then (from the same instance) I did
>olecontainer.treeview.saveasclass into another new .vcx, and from the
>class browser saw it was empty :)
>
>So, I guess it'll be one more cut&paste all by hand.
Once you've asked about this, I also decided to move 2 of my Treeviews to other VCX files (they were not located at the best place). And it worked fine.
I suppose your Treeview was, as mine, saved as a separate class on your VCX (not as a part of a bigger class such as a container or a Form, because then it'll be very easy - just cut and paste the Treeview directly).
These were the steps I've done, all at design time:
First, create a new Form. Then you add to your Form Controls Toolbar the VCX file that contains the Treeview you want to move. Next, add the Treeview to the Form, select it and choose *Save As Class* from the File menu. And that's it. Just choose there the new VCX to store the Treeview. Close the Form without saving.
One important thing is that, even after all of this, I had to open the new VCX file as a table to correct the values at the fields CLASSLOC and CLASS. Those values were wrong (my Treeviews are children of the Project Treeview Class, which is child of the Base System Treeview Class).
HTH,
Renato
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement