diff options
| author | xue <> | 2005-12-31 01:56:58 +0000 | 
|---|---|---|
| committer | xue <> | 2005-12-31 01:56:58 +0000 | 
| commit | e050f7f5e259ffc9df018a7021e8ed946b4d614e (patch) | |
| tree | 7f9c12ac56ba77052a9227c5d231e6cff97bf7f8 /demos/quickstart/protected/pages/Controls/Samples | |
| parent | 21b205564dd4a6602a29b48fb314c4d3d5130ef6 (diff) | |
Added TDropDownList samples.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples')
| -rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page | 91 | ||||
| -rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.php | 22 | 
2 files changed, 113 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page new file mode 100644 index 00000000..9b82a969 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page @@ -0,0 +1,91 @@ +<com:TContent ID="body">
 +
 +<h1>TDropDownList Samples</h1>
 +
 +<table class="sampletable">
 +
 +<tr>
 +<td class="samplenote">
 +Dropdown list with default settings:
 +</td>
 +<td class="sampleaction">
 +<com:TDropDownList />
 +</td>
 +</tr>
 +
 +<tr>
 +<td class="samplenote">
 +Dropdown list with initial items:
 +</td>
 +<td class="sampleaction">
 +<com:TDropDownList>
 +  <com:TListItem Value="value 1" Text="item 1" />
 +  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
 +  <com:TListItem Value="value 3" Text="item 3" />
 +  <com:TListItem Value="value 4" Text="item 4" />
 +</com:TDropDownList>
 +</td>
 +</tr>
 +
 +<tr>
 +<td class="samplenote">
 +List box with customized row number, color and font:
 +</td>
 +<td class="sampleaction">
 +<com:TDropDownList Rows="3" ForeColor="blue" Font.Size="14pt">
 +  <com:TListItem Value="value 1" Text="item 1" />
 +  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
 +  <com:TListItem Value="value 3" Text="item 3" />
 +  <com:TListItem Value="value 4" Text="item 4" />
 +</com:TDropDownList>
 +</td>
 +</tr>
 +
 +<tr>
 +<td class="samplenote">
 +Disabled Dropdown list:
 +</td>
 +<td class="sampleaction">
 +<com:TDropDownList Enabled="false">
 +  <com:TListItem Value="value 1" Text="item 1" />
 +  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
 +  <com:TListItem Value="value 3" Text="item 3" />
 +  <com:TListItem Value="value 4" Text="item 4" />
 +</com:TDropDownList>
 +</td>
 +</tr>
 +
 +<tr>
 +<td class="samplenote">
 +Auto postback Dropdown list:
 +</td>
 +<td class="sampleaction">
 +<com:TDropDownList AutoPostBack="true" SelectedIndexChanged="selectionChanged">
 +  <com:TListItem Value="value 1" Text="item 1" />
 +  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
 +  <com:TListItem Value="value 3" Text="item 3" />
 +  <com:TListItem Value="value 4" Text="item 4" />
 +</com:TDropDownList>
 +<com:TLabel ID="SelectionResult" ForeColor="red" />
 +</td>
 +</tr>
 +
 +<tr>
 +<td class="samplenote">
 +Dropdown list's behavior upon postback:
 +</td>
 +<td class="sampleaction">
 +<com:TDropDownList ID="ListBox1">
 +  <com:TListItem Value="value 1" Text="item 1" />
 +  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
 +  <com:TListItem Value="value 3" Text="item 3" />
 +  <com:TListItem Value="value 4" Text="item 4" />
 +</com:TDropDownList>
 +<com:TButton Text="Submit" Click="buttonClicked"/>
 +<com:TLabel ID="SelectionResult2" ForeColor="red" />
 +</td>
 +</tr>
 +
 +</table>
 +
 +</com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.php new file mode 100644 index 00000000..3835d3c3 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.php @@ -0,0 +1,22 @@ +<?php
 +
 +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).";
 +	}
 +}
 +
 +?>
\ No newline at end of file  | 
