From 6ea993425cc0982ecef765d4bfc6b75b7206416d Mon Sep 17 00:00:00 2001
From: xue <>
Date: Wed, 28 Dec 2005 13:11:07 +0000
Subject:
---
.../quickstart/protected/pages/Fundamentals/Controls.page | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
(limited to 'demos/quickstart/protected/pages/Fundamentals/Controls.page')
diff --git a/demos/quickstart/protected/pages/Fundamentals/Controls.page b/demos/quickstart/protected/pages/Fundamentals/Controls.page
index 6c45acf1..cc0b3eda 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Controls.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Controls.page
@@ -1,7 +1,7 @@
-A control is an instance of class Controls
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.
+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.
Control Tree
@@ -14,20 +14,20 @@ The parent-child relationship is usually established by the framework via Controls->add($child);
$parent->Controls[]=$child;
-where the property Controls
refers to the child control collection of the parent.
+where the property Controls refers to the child control collection of the parent.
-Each control has an ID
property that can be uniquely identify itself among its sibling controls. In addition, each control has a UniqueID
and a ClientID
which can be used to globally identify the control in the tree that the control resides in. UniqueID
and ClientID
are very similar. The former is used by the framework to determine the location of the corresponding control in the tree, while the latter is mainly used on the client side as HTML tag IDs. In general, you should not rely on the explicit format of UniqueID
or ClientID
.
+Each control has an ID property that can be uniquely identify itself among its sibling controls. In addition, each control has a UniqueID and a ClientID which can be used to globally identify the control in the tree that the control resides in. UniqueID and ClientID are very similar. The former is used by the framework to determine the location of the corresponding control in the tree, while the latter is mainly used on the client side as HTML tag IDs. In general, you should not rely on the explicit format of UniqueID or ClientID.
-Each control has a naming container which is a control creating a unique namespace for differentiating between controls with the same ID
. For example, a TRepeater
control creates multiple items each having child controls with the same ID
s. To differentiate these child controls, each item serves as a naming container. Therefore, a child control may be uniquely identified using its naming container's ID
together with its own ID
. As you may already have understood, UniqueID
and ClientID
rely on the naming containers.
+Each control has a naming container which is a control creating a unique namespace for differentiating between controls with the same ID. For example, a TRepeater control creates multiple items each having child controls with the same IDs. To differentiate these child controls, each item serves as a naming container. Therefore, a child control may be uniquely identified using its naming container's ID together with its own ID. As you may already have understood, UniqueID and ClientID rely on the naming containers.
-A control can serve as a naming container if it implements the INamingContainer
interface.
+A control can serve as a naming container if it implements the INamingContainer interface.
-Viewstate and controlstate are implemented in TControl
. They are commonly used to define various properties of controls. To save and retrieve values from viewstate or controlstate, use following methods,
+Viewstate and controlstate are implemented in TControl. They are commonly used to define various properties of controls. To save and retrieve values from viewstate or controlstate, use following methods,
$this->getViewState('Name',$defaultValue); $this->setViewState('Name',$value,$defaultValue); $this->getControlState('Name',$defaultValue); $this->setControlState('Name',$value,$defaultValue);-where
$this
refers to the control instance, Name
refers to a key identifying the persistent value, $defaultValue
is optional. When retrieving values from viewstate or controlstate, if the corresponding key does not exist, the default value will be returned.
+where $this refers to the control instance, Name refers to a key identifying the persistent value, $defaultValue is optional. When retrieving values from viewstate or controlstate, if the corresponding key does not exist, the default value will be returned.
\ No newline at end of file
--
cgit v1.2.3