Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent abuse
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00321381
Message ID:
00321390
Views:
13
>I have created a container class that includes a "Close" command button. I want the button to remove the parent container. (It is added earler thru a NewObject().) I would like to keep it generic in the class Click() method of the button by mentioning the heirarchy instead of the instantiated name of the container. I tried this:
>
> THIS.Parent.Parent.RemoveObject(THIS.Parent)
>
>in the button's Click(), and the results are not pretty.
>
>How can I do this? CAN I do this?
>
>Thanks for help.

cParentName = THIS.Parent.Name
THIS.Parent.Parent.RemoveObject("cParentName")
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform