blob: 0c9b16d5c1cbf9aed0e04a875358e13fa69c5c2d (
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
/*
* Created on 13/05/2006
*/
class VisibleUpdate extends TPage
{
function click1($sender)
{
$this->label1->setText($this->getButtonState($sender));
//$this->button1->setEnabled(false);
$this->button1->setVisible(false);
// $this->button2->setEnabled(true);
$this->button2->setVisible(true);
}
function click2($sender)
{
$this->label1->setText($this->getButtonState($sender));
// $this->button1->setEnabled(true);
$this->button1->setVisible(true);
/// $this->button2->setEnabled(false);
$this->button2->setVisible(false);
}
protected function getButtonState($button)
{
return "Before you clicked on ".$button->Text.
", Button 1 was ".($this->button1->Enabled ? 'enabled' : 'disabled').
" and Button 2 was ".($this->button2->Enabled ? 'enabled' : 'disabled');
}
}
?>
|