diff options
author | xue <> | 2006-01-21 22:45:58 +0000 |
---|---|---|
committer | xue <> | 2006-01-21 22:45:58 +0000 |
commit | c69097235248a906923c846bf479b88965b3ddb7 (patch) | |
tree | 66cb6c1ef689cf44f3bfbd3509a1dcc5bb96af98 | |
parent | be806c9cdb4b66738f51ac73ac432127049ad3e5 (diff) |
Add TImageButton demos.
-rw-r--r-- | .gitattributes | 3 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.page | 50 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.php | 18 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TImageButton/hello_world.gif | bin | 0 -> 1602 bytes |
4 files changed, 71 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes index 09c0ac4c..a8af556d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -70,6 +70,9 @@ demos/quickstart/protected/pages/Controls/Samples/THyperLink/hello_world.gif -te demos/quickstart/protected/pages/Controls/Samples/TImage/HelloWorld.html -text demos/quickstart/protected/pages/Controls/Samples/TImage/Home.page -text demos/quickstart/protected/pages/Controls/Samples/TImage/hello_world.gif -text +demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.page -text +demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.php -text +demos/quickstart/protected/pages/Controls/Samples/TImageButton/hello_world.gif -text demos/quickstart/protected/pages/Controls/Samples/TLabel/Home.page -text demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.page -text demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.php -text diff --git a/demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.page new file mode 100644 index 00000000..e47eea73 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.page @@ -0,0 +1,50 @@ +<com:TContent ID="body">
+
+<h1>TImageButton Samples</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+A click image button showing the click location:
+</td><td class="sampleaction">
+<com:TImageButton
+ ImageUrl=<%~ hello_world.gif %>
+ Text="hello world"
+ OnClick="buttonClicked"
+ />
+<com:TLabel ID="Result" />
+</td></tr>
+
+<tr><td class="samplenote">
+A command image button:
+</td><td class="sampleaction">
+<com:TImageButton
+ ImageUrl=<%~ hello_world.gif %>
+ Text="hello world"
+ OnCommand="buttonClicked"
+ CommandName="test"
+ CommandParameter="value"
+ />
+<com:TLabel ID="Result2" />
+</td></tr>
+
+<tr><td class="samplenote">
+An image 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:TImageButton
+ ImageUrl=<%~ hello_world.gif %>
+ Text="hello world"
+ ValidationGroup="Group"
+ />
+</td></tr>
+
+</table>
+
+</com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.php new file mode 100644 index 00000000..df61ed82 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.php @@ -0,0 +1,18 @@ +<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ if($param instanceof TCommandEventParameter)
+ {
+ $this->Result2->Text="Command name: $param->CommandName, Command parameter: $param->CommandParameter";
+ }
+ else
+ {
+ $this->Result->Text="You clicked at ($param->X,$param->Y)";
+ }
+ }
+}
+
+?>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TImageButton/hello_world.gif b/demos/quickstart/protected/pages/Controls/Samples/TImageButton/hello_world.gif Binary files differnew file mode 100644 index 00000000..bc81443c --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TImageButton/hello_world.gif |