summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-06-01 22:05:09 +0000
committerctrlaltca@gmail.com <>2011-06-01 22:05:09 +0000
commitd0ce04fb74c0163951bbb36fa4f05973d91b02eb (patch)
treee9882887a8616c897c60b4e6187124027415f206 /demos
parent8fede6b6ae8220e264b2eb46819b261d6b39c96b (diff)
added documentation for TActivePanel class
Diffstat (limited to 'demos')
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/ActivePanel.page24
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Home.page2
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.page24
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.php21
4 files changed, 70 insertions, 1 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/ActivePanel.page b/demos/quickstart/protected/pages/ActiveControls/ActivePanel.page
new file mode 100644
index 00000000..dcfbc312
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/ActivePanel.page
@@ -0,0 +1,24 @@
+<com:TContent ID="body" >
+
+<h1>TActivePanel</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActivePanel" />
+
+<p class="block-content">
+
+<tt>TActivePanel</tt> is the <tt>TPanel</tt> active control counterpart.
+<tt>TActivePanel</tt> allows the client-side panel contents to be updated during a
+callback response using the <tt>render</tt> method.
+Example: Assume $param is an instance of <tt>TCallbackEventParameter</tt> attached to
+the <tt>OnCallback</tt> event of a <tt>TCallback</tt> with ID "callback1", and
+"panel1" is the ID of a <tt>TActivePanel</tt>.
+
+<com:TTextHighlighter Language="text" CssClass="source block-content">
+function callback1_requested($sender, $param)
+{
+ $this->panel1->render($param->getNewWriter());
+}
+</com:TTextHighlighter>
+
+<com:RunBar PagePath="ActiveControls.Samples.TActivePanel.Home" />
+
+<div class="last-modified">$Id$</div></com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Home.page b/demos/quickstart/protected/pages/ActiveControls/Home.page
index 6f403a42..93b5b6eb 100644
--- a/demos/quickstart/protected/pages/ActiveControls/Home.page
+++ b/demos/quickstart/protected/pages/ActiveControls/Home.page
@@ -71,7 +71,7 @@ TActiveButton</a> control. See also the later part of the <a href="?page=Tutoria
</li>
<li>
- * <a href="?page=ActiveControls.ActivePanel">TActivePanel</a>
+ <a href="?page=ActiveControls.ActivePanel">TActivePanel</a>
represents a container for other controls on a Web page. In HTML,
it is displayed as a &lt;div&gt; element. The panel's contents
can be replaced during a callback request.
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.page
new file mode 100644
index 00000000..1fb7ca23
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.page
@@ -0,0 +1,24 @@
+<com:TContent ID="body">
+
+<h1>TActivePanel Samples</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+Active panel updated on callback:
+</td><td class="sampleaction">
+<com:TActivePanel ID="panel1" BackColor="#CCFFCC" DefaultButton="button1" Width="400px">
+This is panel content
+<br/>a checkbox: <com:TCheckBox ID="check1"/>
+<br/>a textbox: <com:TTextBox ID="txt1"/>
+<br/>a label: <com:TLabel ID="label1"/>
+<br/><com:TActiveButton ID="button1" Text="click me" OnCallback="buttonClicked" />
+<br/>
+When you press the button, the panel contents will change. Note that out of the
+panel and the button, all the other controls are not active but gets updated
+anyway since they are placed inside the active panel.
+</com:TActivePanel>
+</td></tr>
+</table>
+<com:TJavascriptLogger />
+<div class="last-modified">$Id$</div></com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.php
new file mode 100644
index 00000000..ae174f59
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.php
@@ -0,0 +1,21 @@
+<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ $this->check1->Checked = !$this->check1->Checked;
+ if($this->txt1->Text=="")
+ $this->txt1->Text="changes happens";
+ else
+ $this->txt1->Text="";
+ if($this->label1->Text=="")
+ $this->label1->Text="label has changed, too";
+ else
+ $this->label1->Text="";
+
+ $this->panel1->render($param->NewWriter);
+ }
+}
+
+?> \ No newline at end of file