From 42df6f47862c2f1495ded49f758dbc46f9d9e930 Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 4 May 2006 20:00:46 +0000 Subject: Merge from 3.0 branch till 1023. --- demos/quickstart/protected/pages/Advanced/State.page | 4 ++-- demos/quickstart/protected/pages/Controls/NewControl.page | 6 +++--- .../pages/Controls/Samples/LabeledTextBox2/LabeledTextBox.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'demos/quickstart/protected/pages') diff --git a/demos/quickstart/protected/pages/Advanced/State.page b/demos/quickstart/protected/pages/Advanced/State.page index 30d5b2fc..8d69d6a4 100644 --- a/demos/quickstart/protected/pages/Advanced/State.page +++ b/demos/quickstart/protected/pages/Advanced/State.page @@ -27,7 +27,7 @@ $caption = $this->getViewState('Caption'); Control state is like view state in every aspect except that control state cannot be disabled. Control state is intended to be used for storing crucial state information without which a page or control may not work properly.
-To store and retrieve a variable in control state, use the followign commands, +To store and retrieve a variable in control state, use the following commands,
-To store and retrieve a variable in application state, use the followign commands, +To store and retrieve a variable in application state, use the following commands,
-One can compose a new control in two ways. One is to override the TControl::createChildControls() method. The other is to extend TTemplateControl (or its child classes) and write a control template. The latter is easier to use and can organize the layout constituent compoents more intuitively, while the former is more efficient because it does not require parsing of the template. +One can compose a new control in two ways. One is to extend TCompositeControl and override the TControl::createChildControls() method. The other is to extend TTemplateControl (or its child classes) and write a control template. The latter is easier to use and can organize the layout constituent compoents more intuitively, while the former is more efficient because it does not require parsing of the template.
As an example, we show how to create a labeled textbox called LabeledTextBox using the above two approaches. A labeled textbox displays a label besides a textbox. We want reuse the PRADO provided TLabel and TTextBox to accomplish this task. @@ -48,13 +48,13 @@ In the above, the method call to ensureChildControls() ensures that bot
-For a composite control as simple as LabeledTextBox, it is better to create it by extending TControl and overriding the createChildControls() method, because it does not use templates and thus saves template parsing time. Note, the new control class must implement the INamingContainer interface to ensure the global uniqueness of the ID of its constituent controls. +For a composite control as simple as LabeledTextBox, it is better to create it by extending TCompositeControl and overriding the createChildControls() method, because it does not use templates and thus saves template parsing time.
Complete code for LabeledTextBox is shown as follows,