diff options
author | xue <> | 2006-01-02 20:59:17 +0000 |
---|---|---|
committer | xue <> | 2006-01-02 20:59:17 +0000 |
commit | 4d8ed423f7b4a8eae2898cc5552829595717a581 (patch) | |
tree | 69d23707abe6eedf9eda943fe029004aad39ccc8 /demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList | |
parent | 2df9a40f504933e28ddb9974b97ae4b2bb893f86 (diff) |
TCheckBoxList and TRadioButtonList completed.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList')
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.page | 132 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.php | 22 |
2 files changed, 154 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.page new file mode 100644 index 00000000..95fea89b --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.page @@ -0,0 +1,132 @@ +<com:TContent ID="body">
+
+<h1>TRadioButtonList Samples</h1>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Radio button list with default settings:
+</td>
+<td class="sampleaction">
+<com:TRadioButtonList>
+ <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:TRadioButtonList>
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Radio button list with customized cellpadding, cellspacing, color and text alignment:
+</td>
+<td class="sampleaction">
+<com:TRadioButtonList
+ CellPadding="5"
+ CellSpacing="1"
+ BackColor="silver"
+ TextAlign="Left">
+ <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:TRadioButtonList>
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Radio button list with vertical (default) repeat direction:
+</td>
+<td class="sampleaction">
+<com:TRadioButtonList RepeatColumns="3">
+ <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:TRadioButtonList>
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Radio button list with horizontal repeat direction:
+</td>
+<td class="sampleaction">
+<com:TRadioButtonList RepeatDirection="Horizontal" RepeatColumns="3">
+ <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:TRadioButtonList>
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Radio button list with flow layout and vertical (default) repeat direction:
+</td>
+<td class="sampleaction">
+<com:TRadioButtonList RepeatLayout="Flow" RepeatColumns="3">
+ <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:TRadioButtonList>
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Radio button list with flow layout and horizontal repeat direction:
+</td>
+<td class="sampleaction">
+<com:TRadioButtonList
+ RepeatLayout="Flow"
+ RepeatDirection="Horizontal"
+ RepeatColumns="3">
+ <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:TRadioButtonList>
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Radio button list's behavior upon postback:
+</td>
+<td class="sampleaction">
+<com:TRadioButtonList ID="RadioButtonList">
+ <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:TRadioButtonList>
+<com:TButton Text="Submit" Click="buttonClicked" />
+<br/>
+<com:TLabel ID="SelectionResult" ForeColor="red" />
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Auto postback radio button list:
+</td>
+<td class="sampleaction">
+<com:TRadioButtonList 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:TRadioButtonList>
+<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/TRadioButtonList/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.php new file mode 100644 index 00000000..47d9b23b --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.php @@ -0,0 +1,22 @@ +<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ $index=$this->RadioButtonList->SelectedIndex;
+ $value=$this->RadioButtonList->SelectedValue;
+ $text=$this->RadioButtonList->SelectedItem->Text;
+ $this->SelectionResult->Text="Your selection is (Index: $index, Value: $value, Text: $text).";
+ }
+
+ public function selectionChanged($sender,$param)
+ {
+ $index=$sender->SelectedIndex;
+ $value=$sender->SelectedValue;
+ $text=$sender->SelectedItem->Text;
+ $this->SelectionResult2->Text="Your selection is (Index: $index, Value: $value, Text: $text).";
+ }
+}
+
+?>
\ No newline at end of file |