Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Save/Remove/Restore an object??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00671677
Message ID:
00671740
Vues:
12
>>>I have an scx form and want to remove a few objects off it, then later
>>>restore them. (for what I'm doing the visible property won't work).
>>
>>Set the top property to 10000 then reset it when you want to see it. :)
>
>I need to remove the objects, NOT hide them.
>
>I've asked the question on 3 newsgroups, 11 fourms, and thus far everyone keeps telling me different ways to hide the objects. REMOVE I need to REMOVE objects.

If you're using an array to keep track of your objects just set that array element to null.
Remove the object using thisform.removeobject() when you want it back use thisform.addobject()
and assign the object to the same element of the array.

If you want to save property values for an object you have to store them somewhere persistent like a table or another surrogate object of the same type in a non visible container or a table or form properties.

IOW, you can't save an object, once it is removed it is gone forever. The only thing you can save are property values of that object. Personally, I would use a table to remember my object properties between instances of an object that I want to restore after being removed.
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform