blob: 3873ca309a30e892fcf7afaaf6c9370cc15e7a1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
class Home extends TPage
{
public function buttonClicked($sender,$param)
{
$indices=$this->CheckBoxList->SelectedIndices;
$result='';
foreach($indices as $index)
{
$item=$this->CheckBoxList->Items[$index];
$result.="(Index: $index, Value: $item->Value, Text: $item->Text)\n";
}
if($result==='')
$this->SelectionResult->Text='Your selection is empty.';
else
$this->SelectionResult->Text='Your selection is: '.$result;
}
public function selectionChanged($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->SelectionResult2->Text='Your selection is empty.';
else
$this->SelectionResult2->Text='Your selection is: '.$result;
}
}
?>
|