blob: 7060d84bf4a72ee2c08961e8c4ce0f0a23737d3b (
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
37
38
39
|
<?php
class ActiveDropDownList extends TPage
{
function list1_changed($sender)
{
$this->label1->setText("Selection 1: ".$sender->getSelectedValue());
$this->addOptionsToList2($sender->getSelectedValue());
}
function addOptionsToList2($parent)
{
for($i = 0; $i < 5; $i++)
$this->list2->Items[$i] = $parent.' - item '.($i+1);
$this->list2->setEnabled(true);
}
function list2_changed($sender)
{
$this->label1->setText("Selection 2: ".$sender->getSelectedValue());
}
function select_index_3()
{
$this->list1->setSelectedIndex(3);
}
function clear_selections()
{
$this->list1->clearSelection();
}
function select_value_2()
{
$this->list1->setSelectedValue("value 2");
}
}
?>
|