Adding Properties and Methods to Classes

Visual FoxPro's object model does not allow you to add properties or methods to objects within a container class. Now how does this relate to the form designer and the fact that methods and properties can be added to the form, but not any of the controls? The answer is in the above description when you realize that when you create a form (SCX) using the form designer, you're actually creating a single Form (or Formset) container class.

Since Visual FoxPro does not allow object members of a container class to add methods and properties visually, the Add Property... and Add Method... dialogs in the Form Designer and Class Designer only apply to the form (or Formset) and not any of the added object member controls and custom objects. The Form Designer is actually creates a single container class (either Form or Formset), just like a container class built using the Class Designer, the same rules apply. Only the highest level parent can have added custom properties and methods. When in the Form Designer, you are not defining classes, you are actually manipulating live object instances in a design mode.