Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CREATEOBJECT() vs ADDOBJECT
Message
From
20/07/1998 07:42:50
 
 
To
20/07/1998 07:37:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00119217
Message ID:
00119218
Views:
21
AddObject adds an object to a container. It also includes the new object in the Controls collection of the container.

CreateObject creates an object and stores a reference to it in a variable/property. It doesn't touch any collection of any container.

When an object is added to the Controls collection of a container, the container becomes "aware" of the object. For example, a label created with AddObject can be visible in the container for which it was created, a label created with CreateObject cannot be made visible because it is not owned by any container.

Vlad

>Can someone tell me the difference between the two and when to use each?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform