summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php
diff options
context:
space:
mode:
authorxue <>2006-01-02 20:59:17 +0000
committerxue <>2006-01-02 20:59:17 +0000
commit4d8ed423f7b4a8eae2898cc5552829595717a581 (patch)
tree69d23707abe6eedf9eda943fe029004aad39ccc8 /demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php
parent2df9a40f504933e28ddb9974b97ae4b2bb893f86 (diff)
TCheckBoxList and TRadioButtonList completed.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php34
1 files changed, 9 insertions, 25 deletions
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;
}
}