summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox
diff options
context:
space:
mode:
authorctrlaltca <>2012-07-12 11:21:01 +0000
committerctrlaltca <>2012-07-12 11:21:01 +0000
commit903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch)
treee08bf04f0823650a231227ac3499121270172a23 /demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox
parent3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff)
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox')
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.php128
1 files changed, 64 insertions, 64 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.php
index 795e3eca..509e32ab 100644
--- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.php
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveListBox/Home.php
@@ -1,65 +1,65 @@
-<?php
-
-class Home extends TPage
-{
- public function onLoad($param)
- {
- parent::onLoad($param);
- if(!$this->IsPostBack && !$this->IsCallback)
- {
- $this->resetClicked(null,null);
- }
- }
-
- protected function collectSelectionResult($input,$output)
- {
- $indices=$input->SelectedIndices;
- $result='';
- foreach($indices as $index)
- {
- $item=$input->Items[$index];
- $result.="(Index: $index, Value: $item->Value, Text: $item->Text)";
- }
- if($result==='')
- $output->Text='Your selection is empty.';
- else
- $output->Text='Your selection is: '.$result;
- }
-
- public function selectionChanged($sender,$param)
- {
- $this->collectSelectionResult($sender,$this->SelectionResult);
- }
-
- public function multiSelectionChanged($sender,$param)
- {
- $this->collectSelectionResult($sender,$this->MSelectionResult);
- }
-
- public function buttonClicked($sender, $param)
- {
- $data=array();
- for($i = 0; $i <= $this->box1->Items->Count; $i++)
- $data[$i]="Item number #".$i;
- $this->box1->DataSource=$data;
- $this->box1->dataBind();
- $this->label1->Text="Total ".count($data)." items";
- }
-
- public function resetClicked($sender, $param)
- {
- $data=array('item 1','item 2','item 3','item 4');
- $this->box2->DataSource=$data;
- $this->box2->dataBind();
- $this->label2->Text="ListBox has been reset";
- }
-
- public function clearClicked($sender, $param)
- {
- $this->box2->DataSource=array();
- $this->box2->dataBind();
- $this->label2->Text="ListBox cleared";
- }
-}
-
+<?php
+
+class Home extends TPage
+{
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ if(!$this->IsPostBack && !$this->IsCallback)
+ {
+ $this->resetClicked(null,null);
+ }
+ }
+
+ protected function collectSelectionResult($input,$output)
+ {
+ $indices=$input->SelectedIndices;
+ $result='';
+ foreach($indices as $index)
+ {
+ $item=$input->Items[$index];
+ $result.="(Index: $index, Value: $item->Value, Text: $item->Text)";
+ }
+ if($result==='')
+ $output->Text='Your selection is empty.';
+ else
+ $output->Text='Your selection is: '.$result;
+ }
+
+ public function selectionChanged($sender,$param)
+ {
+ $this->collectSelectionResult($sender,$this->SelectionResult);
+ }
+
+ public function multiSelectionChanged($sender,$param)
+ {
+ $this->collectSelectionResult($sender,$this->MSelectionResult);
+ }
+
+ public function buttonClicked($sender, $param)
+ {
+ $data=array();
+ for($i = 0; $i <= $this->box1->Items->Count; $i++)
+ $data[$i]="Item number #".$i;
+ $this->box1->DataSource=$data;
+ $this->box1->dataBind();
+ $this->label1->Text="Total ".count($data)." items";
+ }
+
+ public function resetClicked($sender, $param)
+ {
+ $data=array('item 1','item 2','item 3','item 4');
+ $this->box2->DataSource=$data;
+ $this->box2->dataBind();
+ $this->label2->Text="ListBox has been reset";
+ }
+
+ public function clearClicked($sender, $param)
+ {
+ $this->box2->DataSource=array();
+ $this->box2->dataBind();
+ $this->label2->Text="ListBox cleared";
+ }
+}
+
?> \ No newline at end of file