From 4d8ed423f7b4a8eae2898cc5552829595717a581 Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 2 Jan 2006 20:59:17 +0000 Subject: TCheckBoxList and TRadioButtonList completed. --- .../pages/Controls/Samples/TCheckBoxList/Home.page | 105 ++++++++++++++++++++- .../pages/Controls/Samples/TCheckBoxList/Home.php | 34 ++----- 2 files changed, 109 insertions(+), 30 deletions(-) (limited to 'demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList') diff --git a/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page index 7f8772c8..ac9de17e 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page @@ -6,10 +6,10 @@ -Check box list with initial items: +Check box list with default settings: - + @@ -20,15 +20,110 @@ Check box list with initial items: -Check box list with initial items: +Check box list with customized cellpadding, cellspacing, color and text alignment: - + - + + + + + + +Check box list with vertical (default) repeat direction: + + + + + + + + + + + + + +Check box list with horizontal repeat direction: + + + + + + + + + + + + + +Check box list with flow layout and vertical (default) repeat direction: + + + + + + + + + + + + + +Check box list with flow layout and horizontal repeat direction: + + + + + + + + + + + + + +Check box list's behavior upon postback: + + + + + + + + + +
+ + + + + + +Auto postback check box list: + + + + + + + + + diff --git a/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php index 6b1d07e1..3873ca30 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php +++ b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php @@ -2,50 +2,34 @@ 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; + $indices=$this->CheckBoxList->SelectedIndices; $result=''; foreach($indices as $index) { - $item=$sender->Items[$index]; + $item=$this->CheckBoxList->Items[$index]; $result.="(Index: $index, Value: $item->Value, Text: $item->Text)\n"; } if($result==='') - $this->MultiSelectionResult->Text='Your selection is empty.'; + $this->SelectionResult->Text='Your selection is empty.'; else - $this->MultiSelectionResult->Text='Your selection is: '.$result; + $this->SelectionResult->Text='Your selection is: '.$result; } - public function buttonClicked2($sender,$param) + public function selectionChanged($sender,$param) { - $indices=$this->ListBox2->SelectedIndices; + $indices=$sender->SelectedIndices; $result=''; foreach($indices as $index) { - $item=$this->ListBox2->Items[$index]; + $item=$sender->Items[$index]; $result.="(Index: $index, Value: $item->Value, Text: $item->Text)\n"; } if($result==='') - $this->MultiSelectionResult2->Text='Your selection is empty.'; + $this->SelectionResult2->Text='Your selection is empty.'; else - $this->MultiSelectionResult2->Text='Your selection is: '.$result; + $this->SelectionResult2->Text='Your selection is: '.$result; } } -- cgit v1.2.3