Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Move treeview from one .vcx to another
Message
De
11/07/1997 17:12:06
Renato De Giovanni
Via Fractal Information Systems
São Paulo, Brésil
 
 
À
10/07/1997 16:10:59
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00038986
Message ID:
00039599
Vues:
39
>> >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
Fil
Voir

Click here to load this message in the networking platform