summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Fundamentals/Controls.page
blob: 7703003d750f93111da2577100c29c878f91210d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<com:TContent ID="body" >
<h1>Controls</h1>
<p>
A control is an instance of class <code>TControl</code> or its subclass. A control is a component defined in addition with user interface. The base class <code>TControl</code> defines the parent-child relationship among controls which reflects the containment relationship among user interface elements.
</p>

<h3>Parent-Child Relationship</h3>
<p>
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.
</p>
<p>
The parent-child relationship is usually established by the framework via <a href="?page=Configurations.Templates1">templates</a>. In code, you may explicitly specify a control as a child of another using the following method,
<pre class="source">
$parent->Controls->add($child);
</pre>
where the property <code>Controls</code> refers to the child control collection of the parent.
</p>

</com:TContent>