summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php
diff options
context:
space:
mode:
authorxue <>2006-01-01 22:58:37 +0000
committerxue <>2006-01-01 22:58:37 +0000
commitf9f431ec8e564465d08a18d9b402ed8643841fa1 (patch)
treec801c634730017f97509aaa44761e3ca9a500441 /demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php
parentf618592c07c32c4955367a4c5bf9c4e18727cefe (diff)
Added initial TCheckBoxList implementation.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php52
1 files changed, 52 insertions, 0 deletions
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