Controls

A control is an instance of class TControl or its subclass. A control is a component defined in addition with user interface. The base class TControl defines the parent-child relationship among controls which reflects the containment relationship among user interface elements.

Parent-Child Relationship

A parent control is in charge of the state transition of its child controls. The rendering result of the child controls are usually used to compose the parent control's presentation.

The parent-child relationship is usually established by the framework via templates. In code, you may explicitly specify a control as a child of another using the following method,

$parent->Controls->add($child);
where the property Controls refers to the child control collection of the parent.