From f9f431ec8e564465d08a18d9b402ed8643841fa1 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 1 Jan 2006 22:58:37 +0000 Subject: Added initial TCheckBoxList implementation. --- .../quickstart/protected/pages/Controls/List.page | 1 + .../pages/Controls/Samples/TCheckBoxList/Home.page | 23 ++++++++++ .../pages/Controls/Samples/TCheckBoxList/Home.php | 52 ++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php (limited to 'demos') 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

TCheckBoxList

+

TRadioButtonList

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 @@ + + +

TCheckBoxList Samples

+ + + + + + + + +
+Check box list with initial items: + + + + + + + +
+ +
\ 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 @@ +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 -- cgit v1.2.3