diff options
author | xue <> | 2006-01-21 03:57:34 +0000 |
---|---|---|
committer | xue <> | 2006-01-21 03:57:34 +0000 |
commit | 1540d094408633a6b01b333b193e731a75457c17 (patch) | |
tree | 30763d6bd04fd20ed57227df005eb1565ad47380 /demos/quickstart/protected/pages | |
parent | baf2eb12bc99905ad18fadaa4a542a0d109f9245 (diff) |
Added TButton demo (incomplete).
Diffstat (limited to 'demos/quickstart/protected/pages')
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page | 69 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php | 14 |
2 files changed, 83 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page new file mode 100644 index 00000000..b2fe4c6c --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page @@ -0,0 +1,69 @@ +<com:TContent ID="body">
+
+<h1>TButton Samples</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+Button with customized color, font, columns, maximum length:
+</td><td class="sampleaction">
+<com:TButton
+ Text="text"
+ Width="200px"
+ ForeColor="silver"
+ BackColor="black"
+ Font.Size="14pt"
+/>
+</td></tr>
+
+<tr><td class="samplenote">
+A click button:
+</td><td class="sampleaction">
+<com:TButton Text="click me" Click="buttonClicked" />
+</td></tr>
+
+<tr><td class="samplenote">
+A command button:
+</td><td class="sampleaction">
+<com:TButton
+ Text="click me"
+ Command="buttonClicked"
+ CommandName="test"
+ CommandParameter="value"
+ />
+</td></tr>
+
+<tr><td class="samplenote">
+A button causing validation:
+</td><td class="sampleaction">
+<com:TTextBox ID="TextBox" />
+<com:TRequiredFieldValidator
+ ControlToValidate="TextBox"
+ Display="Dynamic"
+ ErrorMessage="input required in the textbox"
+ ValidationGroup="Group"
+ />
+<com:TButton Text="submit" ValidationGroup="Group" />
+</td></tr>
+
+<tr><td class="samplenote">
+UseSubmitBehavior
+</td><td class="sampleaction">
+<com:TButton
+ Text="click me"
+ UseSubmitBehavior="false"
+ Click="buttonClicked" />
+</td></tr>
+
+<tr><td class="samplenote">
+PostBackUrl
+</td><td class="sampleaction">
+<com:TButton
+ Text="click me"
+ PostBackUrl="/" />
+</td></tr>
+
+
+</table>
+
+</com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php new file mode 100644 index 00000000..f18072f2 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php @@ -0,0 +1,14 @@ +<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ if($param instanceof TCommandEventParameter)
+ $sender->Text="Name: {$param->CommandName}, Param: {$param->CommandParameter}";
+ else
+ $sender->Text="I'm clicked";
+ }
+}
+
+?>
\ No newline at end of file |