summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/ActiveControls/Samples
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-06-01 21:01:57 +0000
committerctrlaltca@gmail.com <>2011-06-01 21:01:57 +0000
commit05879b19350009f9d9c9db6868b38619d3cb4bdc (patch)
tree1436b115c7892746bebb6137d2d93a4f18ea0565 /demos/quickstart/protected/pages/ActiveControls/Samples
parent45c32f4610b9988e0ebed87674388268ac96ae1f (diff)
added documentation for TActiveLabel class
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples')
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.page34
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.php16
2 files changed, 50 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.page
new file mode 100644
index 00000000..a1e242d3
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.page
@@ -0,0 +1,34 @@
+<com:TContent ID="body">
+
+<h1>TActiveLabel Samples</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+An active label text being set as the result of a callback:
+</td><td class="sampleaction">
+<com:TActiveLabel Text="This is a label" ID="label1"
+/>
+
+<com:TActiveButton
+ Text="click me"
+ OnClick="buttonClicked"
+/>
+</td></tr>
+
+<tr><td class="samplenote">
+Upon button click, the textbox contents will be set on the label. Note that text needs to be properly escaped to avoid html injections:
+</td><td class="sampleaction">
+<com:TActiveTextBox ID="txt2"
+/>
+<com:TActiveButton
+ Text="=>"
+ OnClick="buttonClicked2"
+/>
+<com:TActiveLabel Text="" ID="label2"
+/>
+</td></tr>
+
+</table>
+
+<div class="last-modified">$Id$</div></com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.php
new file mode 100644
index 00000000..aa26fbe5
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveLabel/Home.php
@@ -0,0 +1,16 @@
+<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ $this->label1->Text="You clicked the button, didn't you?";
+ }
+
+ public function buttonClicked2($sender,$param)
+ {
+ $this->label2->Text=THttpUtility::htmlEncode($this->txt2->Text);
+ }
+}
+
+?> \ No newline at end of file