summaryrefslogtreecommitdiff
path: root/demos/quickstart
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart')
-rw-r--r--demos/quickstart/protected/pages/Controls/List.page1
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page23
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php52
3 files changed, 76 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/List.page b/demos/quickstart/protected/pages/Controls/List.page
index f305580b..f3c4cd96 100644
--- a/demos/quickstart/protected/pages/Controls/List.page
+++ b/demos/quickstart/protected/pages/Controls/List.page
@@ -18,6 +18,7 @@ List controls covered in this section are all inherit directly or indirectly fro
<com:RunBar PagePath="Controls.Samples.TDropDownList.Home" />
<h2>TCheckBoxList</h2>
+<com:RunBar PagePath="Controls.Samples.TCheckBoxList.Home" />
<h2>TRadioButtonList</h2>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page
new file mode 100644
index 00000000..04d6e91b
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page
@@ -0,0 +1,23 @@
+<com:TContent ID="body">
+
+<h1>TCheckBoxList Samples</h1>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Check box list with initial items:
+</td>
+<td class="sampleaction">
+<com:TCheckBoxList RepeatLayout="Flow" RepeatDirection="Horizontal" RepeatColumns="2">
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" Selected="true" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" Selected="true" />
+</com:TCheckBoxList>
+</td>
+</tr>
+
+</table>
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php
new file mode 100644
index 00000000..6b1d07e1
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php
@@ -0,0 +1,52 @@
+<?php
+
+class Home extends TPage
+{
+ public function selectionChanged($sender,$param)
+ {
+ $index=$sender->SelectedIndex;
+ $value=$sender->SelectedValue;
+ $text=$sender->SelectedItem->Text;
+ $this->SelectionResult->Text="Your selection is (Index: $index, Value: $value, Text: $text).";
+ }
+
+ public function buttonClicked($sender,$param)
+ {
+ $index=$this->ListBox1->SelectedIndex;
+ $value=$this->ListBox1->SelectedValue;
+ $text=$this->ListBox1->SelectedItem->Text;
+ $this->SelectionResult2->Text="Your selection is (Index: $index, Value: $value, Text: $text).";
+ }
+
+ public function multiSelectionChanged($sender,$param)
+ {
+ $indices=$sender->SelectedIndices;
+ $result='';
+ foreach($indices as $index)
+ {
+ $item=$sender->Items[$index];
+ $result.="(Index: $index, Value: $item->Value, Text: $item->Text)\n";
+ }
+ if($result==='')
+ $this->MultiSelectionResult->Text='Your selection is empty.';
+ else
+ $this->MultiSelectionResult->Text='Your selection is: '.$result;
+ }
+
+ public function buttonClicked2($sender,$param)
+ {
+ $indices=$this->ListBox2->SelectedIndices;
+ $result='';
+ foreach($indices as $index)
+ {
+ $item=$this->ListBox2->Items[$index];
+ $result.="(Index: $index, Value: $item->Value, Text: $item->Text)\n";
+ }
+ if($result==='')
+ $this->MultiSelectionResult2->Text='Your selection is empty.';
+ else
+ $this->MultiSelectionResult2->Text='Your selection is: '.$result;
+ }
+}
+
+?> \ No newline at end of file